X-Git-Url: https://git.dogcows.com/gitweb?p=chaz%2Fp5-Return-Type-Lexical;a=blobdiff_plain;f=lib%2FReturn%2FType%2FLexical.pm;fp=lib%2FReturn%2FType%2FLexical.pm;h=873d447e87175332d9b4202c9411767525f1d56d;hp=a6d58073a0a3c0535a0af10f867c57037df1c507;hb=0bcd41cd4ec73d89311a02473d20bf34c2aeb420;hpb=43503e051d101a0e6c2abc1f2ab0f02a32f92ea4 diff --git a/lib/Return/Type/Lexical.pm b/lib/Return/Type/Lexical.pm index a6d5807..873d447 100644 --- a/lib/Return/Type/Lexical.pm +++ b/lib/Return/Type/Lexical.pm @@ -19,7 +19,8 @@ sub unimport { } sub _in_effect { - my $level = shift // 0; + my ($level) = @_; + $level = 0 if !defined $level; my $hinthash = (caller($level))[10]; my $in_effect = $hinthash->{'Return::Type::Lexical/in_effect'}; return !defined $in_effect || $in_effect;