From 0bcd41cd4ec73d89311a02473d20bf34c2aeb420 Mon Sep 17 00:00:00 2001 From: Charles McGarvey Date: Tue, 10 Mar 2020 10:39:04 -0600 Subject: [PATCH] avoid // operator to be compatible with old perls --- lib/Return/Type/Lexical.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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; -- 2.43.0