From 620cdd17ca21d9e7cf83dd97bb51b195018e8c83 Mon Sep 17 00:00:00 2001 From: Steve Hancock Date: Wed, 24 Apr 2024 21:18:58 -0700 Subject: [PATCH] fix c362, distinguish between prototype and signature --- lib/Perl/Tidy/Tokenizer.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 ) -- 2.39.5