From: Steve Hancock Date: Tue, 30 Apr 2024 02:27:55 +0000 (-0700) Subject: fix prototype underscore treatment X-Git-Tag: 20240511~10 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=5faa0b6a0e7a27c436d05edadbf33b795112e269;p=perltidy.git fix prototype underscore treatment --- 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{\\} ) {