in reply to cpan install($_) doesn't work in loop, but normal lexical var does
The same error will occur with the following:
for ( "a" ) { $_ = 1; } # Or for ( "a" ) { while (<>){ } }
The magic of $_ is too fragile for anything but simple cases in my opinion. Do this instead:
for my $module ('Catalyst::Plugin::Authentication') { }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: cpan install($_) doesn't work in loop, but normal lexical var does
by xdg (Monsignor) on Aug 27, 2006 at 20:09 UTC | |
|
Re^2: cpan install($_) doesn't work in loop, but normal lexical var does
by doom (Deacon) on Aug 27, 2006 at 22:58 UTC | |
by starbolin (Hermit) on Aug 28, 2006 at 00:23 UTC | |
by doom (Deacon) on Aug 28, 2006 at 02:29 UTC | |
by starbolin (Hermit) on Aug 29, 2006 at 00:47 UTC | |
by shmem (Chancellor) on Aug 29, 2006 at 06:45 UTC |