in reply to Re^2: Unforgettable Closures?
in thread Unforgettable Closures?

I hadn't tried it earlier, but I get the same here with 5.10.0, with & without warnings. It appears that Deprecated use of my() in false conditional applies only in limited cases:

my $x if 0; #warns my $x if ""; #warns my $x if undef; #OK my $x = 0 if 0; #OK
Test program used:

use warnings; sub a { my $x = 0 if undef; print ++$x } a for 1 .. 3;