From: Steve Hancock Date: Sat, 27 Apr 2024 00:45:33 +0000 (-0700) Subject: fix arg count issue when pop is used instead of shift X-Git-Tag: 20240511~13 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=ab7a48835df70226810f265aec6801b6c6d9f564;p=perltidy.git fix arg count issue when pop is used instead of shift --- 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