You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
perl-PPI/PPI-1.228-fix-temporary-fix...

13 lines
672 B

--- lib/PPI/Tokenizer.pm
+++ lib/PPI/Tokenizer.pm
@@ -833,8 +833,7 @@ sub __current_token_is_forced_word {
# We also have to make sure that the sub/package/etc doing the forcing
# is not a method call.
if( $USUALLY_FORCES{$content}) {
- return 1 if not defined $word; # TODO this is a quick fix to unblock Perl::Critic users, needs to be verified
- return if $word =~ /^v[0-9]+$/ and ( $content eq "use" or $content eq "no" );
+ return if defined($word) and $word =~ /^v[0-9]+$/ and ( $content eq "use" or $content eq "no" );
return 1 if not $prevprev;
return 1 if not $USUALLY_FORCES{$prevprev->content} and $prevprev->content ne '->';
return;