]> Dogcows Code - chaz/p5-Return-Type-Lexical/blobdiff - lib/Return/Type/Lexical.pm
avoid // operator to be compatible with old perls
[chaz/p5-Return-Type-Lexical] / lib / Return / Type / Lexical.pm
index a6d58073a0a3c0535a0af10f867c57037df1c507..873d447e87175332d9b4202c9411767525f1d56d 100644 (file)
@@ -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;
This page took 0.022181 seconds and 4 git commands to generate.