From: Vincent Pit Date: Tue, 10 Mar 2015 19:05:26 +0000 (-0300) Subject: Only test global destruction on perl 5.13.4+ X-Git-Tag: rt101410~6 X-Git-Url: http://git.vpit.fr/?p=perl%2Fmodules%2FVariable-Magic.git;a=commitdiff_plain;h=c616330372aea7cc94ba28dda6fa38fd302dbdaf Only test global destruction on perl 5.13.4+ Or if PERL_VARIABLE_MAGIC_TEST_THREADS is set, for debugging purpose. --- diff --git a/t/lib/Variable/Magic/TestGlobalDestruction.pm b/t/lib/Variable/Magic/TestGlobalDestruction.pm index ca7997f..a840f2a 100644 --- a/t/lib/Variable/Magic/TestGlobalDestruction.pm +++ b/t/lib/Variable/Magic/TestGlobalDestruction.pm @@ -66,6 +66,11 @@ sub import { my %args = @_; my $level = $args{level} || 1; + if ("$]" < 5.013_004 and not $ENV{PERL_VARIABLE_MAGIC_TEST_THREADS}) { + _diag("perl 5.13.4 required to safely test global destruction"); + return; + } + my $env_level = int($ENV{PERL_DESTRUCT_LEVEL} || 0); if ($env_level >= $level) { my $is_debugging = is_debugging_perl();