From ab7a48835df70226810f265aec6801b6c6d9f564 Mon Sep 17 00:00:00 2001 From: Steve Hancock Date: Fri, 26 Apr 2024 17:45:33 -0700 Subject: [PATCH] fix arg count issue when pop is used instead of shift --- lib/Perl/Tidy/Formatter.pm | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/Perl/Tidy/Formatter.pm b/lib/Perl/Tidy/Formatter.pm index 2108405f..ff4e1eed 100644 --- a/lib/Perl/Tidy/Formatter.pm +++ b/lib/Perl/Tidy/Formatter.pm @@ -14118,9 +14118,11 @@ EOM #-------------------------------- # the whole file has been scanned #-------------------------------- - $item->{shift_count_min} = $shift_count; - $item->{shift_count_max} = $shift_count; - $item->{self_name} = $self_name; + if ( !$saw_pop_at_underscore ) { + $item->{shift_count_min} = $shift_count; + $item->{shift_count_max} = $shift_count; + $item->{self_name} = $self_name; + } return; } ## end sub count_sub_args -- 2.39.5