Skip Menu |
 

This queue is for tickets about the Class-C3-Componentised CPAN distribution.

Report information
The Basics
Id: 66661
Status: resolved
Priority: 0/
Queue: Class-C3-Componentised

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

Bug Information
Severity: Critical
Broken in: 1.0008
Fixed in: 1.0009



Subject: about using $_ and @_ in loading loop
Download (untitled) / with headers
text/plain 514b
Hi, I use Class::C3::Componentised through DBIx::Class. When I load a component, I have a problem because it rewrite global variables $_ this is not good but it's not my module... so. In function _load_components, there is a loop on @_ using $_. I think it is not a good practice, this loop must be done on a local variable : Class/C3/Componentised.pm +91 : $class->ensure_class_loaded($_) for @_; must be : my @list = @_; foreach my $c (@list) { $class->ensure_class_loaded($c); } Hope this help Nicolas
Download (untitled) / with headers
text/plain 728b
On Wed Mar 16 10:02:17 2011, NOUDARD wrote: Show quoted text
> Hi, > > I use Class::C3::Componentised through DBIx::Class. > > When I load a component, I have a problem because it rewrite global > variables $_ this is not good but it's not my module... so. > > In function _load_components, there is a loop on @_ using $_. I think it > is not a good practice, this loop must be done on a local variable :
Must is a strong word. I am not changing the working of this module - using local variables all over the place would add more overhead to something that should be as light as require(). However the problem is real and it was fixed, just not the way you suggested: http://dev.catalystframework.org/svnweb/bast/revision?rev=9839 Cheers!


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.