]> git.donarmstrong.com Git - perltidy.git/commitdiff
fix prototype underscore treatment
authorSteve Hancock <perltidy@users.sourceforge.net>
Tue, 30 Apr 2024 02:27:55 +0000 (19:27 -0700)
committerSteve Hancock <perltidy@users.sourceforge.net>
Tue, 30 Apr 2024 02:27:55 +0000 (19:27 -0700)
lib/Perl/Tidy/Formatter.pm

index 68410f1dc0f1e7cd199224c30e029bed85072424..0ec654c3780f0c57a8e66da0f3243ad7335ce21d 100644 (file)
@@ -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{\\} ) {