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

Gah! I was reading perl595delta instead of perl5100delta

Is perl5100delta relevant here ?

I mean ... the code provided by the op produces the same output on both 5.8.8 and 5.10.0 (for me, anyway):
1,2,3 at try.pl line 22. my func is funky!
Cheers,
Rob

Replies are listed 'Best First'.
Re^3: Unforgettable Closures?
by FunkyMonk (Bishop) on Dec 09, 2007 at 14:29 UTC
    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;