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)

Attachments


Subject: handles entries pollute Moose::Object with empty globs
Download (untitled) / with headers
text/plain 188b
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;
Download (untitled) / with headers
text/plain 468b
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.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.