X-Git-Url: http://git.vpit.fr/?a=blobdiff_plain;f=t%2Flib%2FVariable%2FMagic%2FTestGlobalDestruction.pm;h=d4b67496686c5e6b9a0916a61250984b1c9762ed;hb=639740d033285630593f2dc4773e5a8b7fa42ed6;hp=ca7997fff93b96fa4831f7c6106ea52aa5efacf4;hpb=99ea475d5ffa3d928db9228ee689d274ecb45beb;p=perl%2Fmodules%2FVariable-Magic.git diff --git a/t/lib/Variable/Magic/TestGlobalDestruction.pm b/t/lib/Variable/Magic/TestGlobalDestruction.pm index ca7997f..d4b6749 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(); @@ -90,6 +95,9 @@ sub import { _diag("Global destruction level $level set by Perl::Destruct::Level"); return; } + + _diag("Not testing global destruction"); + return; } 1;