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
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
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!