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.
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';