]> git.donarmstrong.com Git - perltidy.git/commitdiff
fix arg count issue when pop is used instead of shift
authorSteve Hancock <perltidy@users.sourceforge.net>
Sat, 27 Apr 2024 00:45:33 +0000 (17:45 -0700)
committerSteve Hancock <perltidy@users.sourceforge.net>
Sat, 27 Apr 2024 00:45:33 +0000 (17:45 -0700)
lib/Perl/Tidy/Formatter.pm

index 2108405f98853b420ef0b276ade70db0f416cbc4..ff4e1eed85ee4b58dd4bcaef93a3366415b96ffe 100644 (file)
@@ -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