From: Vincent Pit Date: Mon, 30 Mar 2015 17:13:40 +0000 (-0300) Subject: Allow passing level 0 to Variable::Magic::TestGlobalDestruction::import X-Git-Tag: v0.57~21 X-Git-Url: http://git.vpit.fr/?a=commitdiff_plain;h=7aa917c0209f40fa1593742b2cadeefe1d4f0922;p=perl%2Fmodules%2FVariable-Magic.git Allow passing level 0 to Variable::Magic::TestGlobalDestruction::import --- diff --git a/t/lib/Variable/Magic/TestGlobalDestruction.pm b/t/lib/Variable/Magic/TestGlobalDestruction.pm index 83f88bb..d610dc0 100644 --- a/t/lib/Variable/Magic/TestGlobalDestruction.pm +++ b/t/lib/Variable/Magic/TestGlobalDestruction.pm @@ -63,8 +63,10 @@ sub is_debugging_perl { sub import { shift; - my %args = @_; - my $level = $args{level} || 1; + my %args = @_; + + my $level = $args{level}; + $level = 1 unless defined $level; if ("$]" < 5.013_004 and not $ENV{PERL_VARIABLE_MAGIC_TEST_THREADS}) { _diag("perl 5.13.4 required to safely test global destruction");