X-Git-Url: http://git.vpit.fr/?a=blobdiff_plain;f=t%2F60-uplevel-target.t;h=c605299bcf8d1efadecc3f2814b20640cdbd4bd3;hb=65830be3a9a639367f235c7fe5bfd16ee7e5e176;hp=1dcf3251b71591ec061af186942079d9f5dd6436;hpb=0c640ded3d3d3939e6fb99c3a94c6bf6e54a360a;p=perl%2Fmodules%2FScope-Upper.git diff --git a/t/60-uplevel-target.t b/t/60-uplevel-target.t index 1dcf325..c605299 100644 --- a/t/60-uplevel-target.t +++ b/t/60-uplevel-target.t @@ -226,7 +226,9 @@ sub four { 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'; @@ -237,6 +239,7 @@ sub four { ++$lexical; is $destroyed, 0, "$desc: not yet 1"; }; + $code = bless $code, 'Scope::Upper::TestCodeDestruction'; eval { sub { @@ -251,7 +254,7 @@ sub four { is $destroyed, 0, "$desc: not yet 3"; }; - is $destroyed, 0, "$desc: code is destroyed"; + is $destroyed, 1, "$desc: code is destroyed"; } SKIP: {