]> git.donarmstrong.com Git - perltidy.git/commitdiff
fix problem parsing sub prototypes
authorSteve Hancock <perltidy@users.sourceforge.net>
Tue, 8 Sep 2020 21:04:45 +0000 (14:04 -0700)
committerSteve Hancock <perltidy@users.sourceforge.net>
Tue, 8 Sep 2020 21:04:45 +0000 (14:04 -0700)
lib/Perl/Tidy/Tokenizer.pm

index f333caef6ba33ff9c26a622d359d0ef06fae1d65..380f7d29a07c93153655a55bbc7f982196ccb527 100644 (file)
@@ -5957,7 +5957,7 @@ sub scan_identifier_do {
     my $tok                 = $tok_begin;
     my $message             = "";
 
-    my $in_prototype_or_signature = $container_type =~ /^sub/;
+    my $in_prototype_or_signature = $container_type =~ /^sub\b/;
 
     # these flags will be used to help figure out the type:
     my $saw_alpha = ( $tok =~ /^\w/ );