Subject: | [PATCH] A sub named each, keys or values infers 5.014 |
Hello,
one of my packages has a method named keys. This makes Perl::MinimumVersion report 5.014
as the minimal version.
The attached file solves the problem, but my knowledge of PPI is pretty much non-existing so I
don't know it is the correct fix.
Thanks,
--
Hi, how are you?
Subject: | minimum-version.patch |
--- MinimumVersion.pm.orig 2013-01-15 13:19:10.000000000 +0000
+++ MinimumVersion.pm 2013-01-15 13:18:44.000000000 +0000
@@ -633,6 +633,8 @@
}
} elsif($next->isa('PPI::Token::Operator')) { # % $a
return '';
+ } elsif($_[1]->parent->isa('PPI::Statement::Sub')) { # sub each|keys|values
+ return '';
} else { # function call or other should be reference
if(5.014 > ($version || 0)) {
$version = 5.014;