Matt S Trout wrote:
On Fri, Jul 13, 2007 at 05:31:53PM +0100, Matt Lawrence wrote:
stephen joseph butler wrote:
On 7/13/07, Matt Lawrence <[EMAIL PROTECTED]> wrote:
I can't replicate this behaviour. As far as I can tell, the postfix if is identical to the block if I wrote above.


perl -Mstrict -wle 'my $foo = 1 if 0; print defined $foo ? $foo : "undef"'
undef


Has the bug been fixed?

No, because people use the "if 0" construct as a way to create a static.

cain$ re.pl $ sub foo { my $foo if 0; $foo++; } $ foo(); 0 $ foo();
1                                                                               
$ foo();
2 $

Eurgh. I've never seen that before, but it's horrible.

Matt



_______________________________________________
List: Catalyst@lists.rawmode.org
Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/
Dev site: http://dev.catalyst.perl.org/

Reply via email to