From: Vincent Pit Date: Mon, 10 Oct 2011 20:04:36 +0000 (+0200) Subject: Skip a destructor test on perl 5.6 in t/74-uid-validate.t X-Git-Tag: v0.18~1 X-Git-Url: http://git.vpit.fr/?p=perl%2Fmodules%2FScope-Upper.git;a=commitdiff_plain;h=781b4bd63a83b8363268f878964c1a90d76c3d70 Skip a destructor test on perl 5.6 in t/74-uid-validate.t An object destructor is always fired last before 5.8. For example, our $y = 1; sub X::DESTROY { print $y } { local $y = 2; my $x = bless [], "X" } will print 1 on 5.6 and 2 on 5.8. --- diff --git a/t/74-uid-validate.t b/t/74-uid-validate.t index 8e7cdcc..e58a162 100644 --- a/t/74-uid-validate.t +++ b/t/74-uid-validate.t @@ -122,7 +122,9 @@ for my $wrong ('67-8.9', '001-def') { ok validate_uid($top), '$top defined before the guard is valid in destructor'; } - { + SKIP: { + skip 'Destructors are always last before perl 5.8' => 2 if "$]" < 5.008; + $top = uid; my $guard = bless [], 'Scope::Upper::TestUIDDestructor2'; ok validate_uid($top), '$top defined before the guard is valid in block';