http://www.perlmonks.org?node_id=905643


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";