]> Dogcows Code - chaz/p5-Return-Type-Lexical/commitdiff
avoid // operator to be compatible with old perls
authorCharles McGarvey <chazmcgarvey@brokenzipper.com>
Tue, 10 Mar 2020 16:39:04 +0000 (10:39 -0600)
committerCharles McGarvey <chazmcgarvey@brokenzipper.com>
Tue, 10 Mar 2020 16:39:04 +0000 (10:39 -0600)
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.020652 seconds and 4 git commands to generate.