in reply to Re^3: Closure warning with Perl 5.14?
in thread Closure warning with Perl 5.14?
This complains about uninitialized value (of course), but gives no warning in 5.14.0:
use warnings; use strict; use constant duh => 0; my $y = "X" if duh; sub x{ print $y ? 'Okay' : 'bad'; } x(); print "$y\n";
And no warning even for this:
use warnings; use strict; my $y = "X" if 0; sub x{ print $y ? 'Okay' : 'bad'; } x(); print "$y\n";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: Closure warning with Perl 5.14?
by JavaFan (Canon) on May 19, 2011 at 09:45 UTC | |
by ikegami (Patriarch) on May 19, 2011 at 09:55 UTC | |
by JavaFan (Canon) on May 19, 2011 at 10:56 UTC | |
by John M. Dlugosz (Monsignor) on May 19, 2011 at 13:41 UTC | |
by JavaFan (Canon) on May 19, 2011 at 13:59 UTC | |
by John M. Dlugosz (Monsignor) on May 19, 2011 at 14:05 UTC |