Skip Menu |

This queue is for tickets about the Moose CPAN distribution.

Report information
The Basics
Id: 91221
Status: rejected
Priority: 0/
Queue: Moose

People
Owner: Nobody in particular
Requestors: haarg [...] haarg.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: handles entries pollute Moose::Object with empty globs
Any entry in an attribute's handles param will cause a glob (empty) to be created in Moose::Object's stash. This is pretty minor, but seems like it should be avoided. Test case attached.
Subject: handles-moose-object-pollution.t
use strict; use warnings; use Test::More; { package Some::Package; use Moose; has '_results' => ( is => 'rw', handles => { results => 'elements', }, ); } ok !exists $Moose::Object::{results}, "handles doesn't create entries in Moose::Object's stash"; done_testing;
On Fri Dec 06 12:08:25 2013, haarg wrote: Show quoted text
> Any entry in an attribute's handles param will cause a glob (empty) to > be created in Moose::Object's stash. This is pretty minor, but seems > like it should be avoided. > > Test case attached.
I looked at this again briefly and I'm going to reject it. The extra globs are created by calls to Moose::Object->can($handle), which is perfectly reasonable. And this doesn't actually cause any problems that I am aware of.