From 5faa0b6a0e7a27c436d05edadbf33b795112e269 Mon Sep 17 00:00:00 2001 From: Steve Hancock Date: Mon, 29 Apr 2024 19:27:55 -0700 Subject: [PATCH] fix prototype underscore treatment --- lib/Perl/Tidy/Formatter.pm | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/Perl/Tidy/Formatter.pm b/lib/Perl/Tidy/Formatter.pm index 68410f1d..0ec654c3 100644 --- a/lib/Perl/Tidy/Formatter.pm +++ b/lib/Perl/Tidy/Formatter.pm @@ -13640,6 +13640,10 @@ sub count_prototype_args { elsif ( $ch eq '(' ) { last if ($count_min) } elsif ( $ch eq ')' ) { last } elsif ( $ch eq ';' && !$saw_semicolon ) { $saw_semicolon = 1 } + elsif ( $ch eq '_' && !$saw_semicolon ) { + $saw_semicolon = 1; + $bump_count->() if ( !$count_min ); + } elsif ( $is_array_sigil{$ch} ) { $saw_array->(); last } elsif ( $is_scalar_sigil{$ch} ) { $bump_count->(); } elsif ( $ch eq q{\\} ) { -- 2.39.5