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) ; }
[download]