in reply to Re^5: Lexical scope vs. postfix loops (perl bug?)
in thread Lexical scope vs. postfix loops (perl bug?)

I agree... it's hard to agree on what the behavior is (probably why it has remained undefined) but if the behavior is "undefined" then a warning should be emitted either under "use warnings" or (my preference) "use strict".

Could you not add a new category for this under "strict" or "warnings" so that you could say:

use strict; no strict 'postfix';

That might satisfy the gurus who have code that depends on this "weird" behavior.

Replies are listed 'Best First'.
Re^7: Lexical scope vs. postfix loops (perl bug?)
by moritz (Cardinal) on Aug 25, 2008 at 21:20 UTC
    Having to add another line to your code isn't their notion of backwards compatibility, and in this case I have to agree.

    And not making it a default would also be weird, because in the case of strict it would require two lines (use strict; use strict 'postfix';), and in the case of warnings it would imply that use warnings; isn't the same as use warnings 'all';, on which others rely.