Public Scratchpad | Download, Select Code To D/L |
Closure bug test:
use Test; BEGIN { plan tests => 6 } ; for(1..3) { my $DESTROY ; sub DESTROY { $DESTROY = 1 } $DESTROY = undef ; my $ref ; { my $o = bless {} ; ok(!$DESTROY) ; } ok($DESTROY) ; }
Public Scratchpad | Download, Select Code To D/L |
use Test; BEGIN { plan tests => 6 } ; for(1..3) { my $DESTROY ; sub DESTROY { $DESTROY = 1 } $DESTROY = undef ; my $ref ; { my $o = bless {} ; ok(!$DESTROY) ; } ok($DESTROY) ; }