From: Vincent Pit Date: Tue, 10 Mar 2015 19:08:30 +0000 (-0300) Subject: Make Variable::Magic::TestGlobalDestruction::import return its result X-Git-Tag: rt101410~4 X-Git-Url: http://git.vpit.fr/?a=commitdiff_plain;h=940ac7970d4882d00141cd889050c037e6c980b9;p=perl%2Fmodules%2FVariable-Magic.git Make Variable::Magic::TestGlobalDestruction::import return its result --- diff --git a/t/lib/Variable/Magic/TestGlobalDestruction.pm b/t/lib/Variable/Magic/TestGlobalDestruction.pm index d4b6749..3299bf3 100644 --- a/t/lib/Variable/Magic/TestGlobalDestruction.pm +++ b/t/lib/Variable/Magic/TestGlobalDestruction.pm @@ -68,7 +68,7 @@ sub import { if ("$]" < 5.013_004 and not $ENV{PERL_VARIABLE_MAGIC_TEST_THREADS}) { _diag("perl 5.13.4 required to safely test global destruction"); - return; + return 0; } my $env_level = int($ENV{PERL_DESTRUCT_LEVEL} || 0); @@ -77,7 +77,7 @@ sub import { require Test::More; if ($is_debugging) { _diag("Global destruction level $env_level set by PERL_DESTRUCT_LEVEL (debugging perl)"); - return; + return 1; } else { _diag("PERL_DESTRUCT_LEVEL is set to $env_level, but this perl doesn't seem to have debugging enabled"); } @@ -93,11 +93,11 @@ sub import { }; if ($has_perl_destruct_level) { _diag("Global destruction level $level set by Perl::Destruct::Level"); - return; + return 1; } _diag("Not testing global destruction"); - return; + return 0; } 1;