in reply to Unforgettable Closures?
NOTE: The behaviour of a my statement modified with a statement modifier conditional or loop construct (e.g. my $x if ... ) is undefined. The value of the my variable may be undef, any previously assigned value, or possibly anything else. Don't rely on it. Future versions of perl might do something different from the version of perl you try it out on. Here be dragons.I thought this "feature" had been removed in the upcoming 5.10 release of perl, but I can't find any reference to it now :(
update
Gah! I was reading perl595delta instead of perl5100delta:
New or Changed Diagnostics...
Deprecated use of my() in false conditional
A new deprecation warning, Deprecated use of my() in false conditional, has been added, to warn against the use of the dubious and deprecated constructmy $x if 0;
See perldiag. Use state variables instead.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Unforgettable Closures?
by syphilis (Archbishop) on Dec 09, 2007 at 12:42 UTC | |
by FunkyMonk (Bishop) on Dec 09, 2007 at 14:29 UTC | |
|
Re^2: Unforgettable Closures?
by faiz (Acolyte) on Dec 10, 2007 at 00:55 UTC | |
by tye (Sage) on Dec 10, 2007 at 03:46 UTC | |
by faiz (Acolyte) on Dec 10, 2007 at 04:58 UTC | |
by ikegami (Patriarch) on Dec 10, 2007 at 05:59 UTC | |
by faiz (Acolyte) on Dec 10, 2007 at 07:27 UTC | |
by tye (Sage) on Dec 10, 2007 at 05:52 UTC |