From: Steve Hancock Date: Wed, 15 May 2024 13:26:34 +0000 (-0700) Subject: improve -dma and -wma coverage X-Git-Tag: 20240511.02~2 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=b30145bc8554db286ad6be82c60ad9c4086fefa4;p=perltidy.git improve -dma and -wma coverage --- diff --git a/lib/Perl/Tidy/Formatter.pm b/lib/Perl/Tidy/Formatter.pm index fe9235c2..849c3b64 100644 --- a/lib/Perl/Tidy/Formatter.pm +++ b/lib/Perl/Tidy/Formatter.pm @@ -13885,7 +13885,6 @@ EOM $item->{is_signature} = 0; $item->{shift_count_min} = $shift_count; $item->{shift_count_max} = $shift_count; - $item->{self_name} = $self_name; $self->count_list_args($item); return; } @@ -14001,6 +14000,10 @@ EOM if ( $rLL->[$K_mm]->[_TYPE_] eq 'i' ) { my $token_mm = $rLL->[$K_mm]->[_TOKEN_]; $self_name = $token_mm; + + # we store self_name immediately because it will + # be needed even if we cannot get an arg count + $item->{self_name} = $self_name; } } } @@ -14023,7 +14026,6 @@ EOM { $item->{shift_count_min} = $shift_count; $item->{shift_count_max} = $shift_count; - $item->{self_name} = $self_name; } return; } @@ -14151,7 +14153,6 @@ EOM if ( !$saw_pop_at_underscore ) { $item->{shift_count_min} = $shift_count; $item->{shift_count_max} = $shift_count; - $item->{self_name} = $self_name; } return;