From: Steve Hancock Date: Thu, 25 Apr 2024 04:18:58 +0000 (-0700) Subject: fix c362, distinguish between prototype and signature X-Git-Tag: 20240511~19 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=620cdd17ca21d9e7cf83dd97bb51b195018e8c83;p=perltidy.git fix c362, distinguish between prototype and signature --- diff --git a/lib/Perl/Tidy/Tokenizer.pm b/lib/Perl/Tidy/Tokenizer.pm index 35c93ed6..12b50faf 100644 --- a/lib/Perl/Tidy/Tokenizer.pm +++ b/lib/Perl/Tidy/Tokenizer.pm @@ -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 )