is $destroyed, 1, "$desc: target is detroyed";
}
- {
+ SKIP: {
+ skip 'This fails even with a plain subroutine call on 5.8.x' => 6
+ if "$]" < 5.009;
local $@;
local $destroyed = 0;
my $desc = 'code destruction';
++$lexical;
is $destroyed, 0, "$desc: not yet 1";
};
+ $code = bless $code, 'Scope::Upper::TestCodeDestruction';
eval {
sub {
is $destroyed, 0, "$desc: not yet 3";
};
- is $destroyed, 0, "$desc: code is destroyed";
+ is $destroyed, 1, "$desc: code is destroyed";
}
SKIP: {