fix c362, distinguish between prototype and signature
authorSteve Hancock <perltidy@users.sourceforge.net>
Thu, 25 Apr 2024 04:18:58 +0000 (21:18 -0700)
committerSteve Hancock <perltidy@users.sourceforge.net>
Thu, 25 Apr 2024 04:18:58 +0000 (21:18 -0700)
lib/Perl/Tidy/Tokenizer.pm

index 35c93ed6a4bb6ff3c4964f99e9b8830fe05a340d..12b50faf0f20f2df87058704f6dcb7d3c975ecfc 100644 (file)
@@ -9293,9 +9293,10 @@ EOM
         # regex below uses [A-Za-z] rather than \w
         # This is the old regex which has been replaced:
         # $input_line =~ m/\G(\s*\([^\)\(\}\{\,#]*\))?  # PROTO
+        # Added '=' for issue c362
         my $saw_opening_paren = $input_line =~ /\G\s*\(/;
         if (
-            $input_line =~ m{\G(\s*\([^\)\(\}\{\,#A-Za-z]*\))?  # PROTO
+            $input_line =~ m{\G(\s*\([^\)\(\}\{\,#A-Za-z=]*\))?  # PROTO
             (\s*:)?                              # ATTRS leading ':'
             }gcx
             && ( $1 || $2 )