From: Steve Hancock Date: Mon, 1 Apr 2024 00:23:18 +0000 (-0700) Subject: ignore my subs for -dma -wmat X-Git-Tag: 20240202.04~7 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=6aeed52647309c15f39741766b771692c458df56;p=perltidy.git ignore my subs for -dma -wmat --- diff --git a/lib/Perl/Tidy/Formatter.pm b/lib/Perl/Tidy/Formatter.pm index ad20f0bd..c34c2163 100644 --- a/lib/Perl/Tidy/Formatter.pm +++ b/lib/Perl/Tidy/Formatter.pm @@ -14062,9 +14062,14 @@ sub cross_check_call_args { my ( $shift_count, $self_name ); my $rsub_item = $rsub_info->{$key}; if ( defined($rsub_item) ) { - $common_hash{$key}->{rsub_item} = $rsub_item; - $shift_count = $rsub_item->{shift_count}; - $self_name = $rsub_item->{self_name}; + + # skip 'my' subs for now, they need special treatment + my $seqno_sub = $rsub_item->{seqno}; + if ( !$ris_my_sub_by_seqno->{$seqno_sub} ) { + $common_hash{$key}->{rsub_item} = $rsub_item; + $shift_count = $rsub_item->{shift_count}; + $self_name = $rsub_item->{self_name}; + } } # compare caller/sub arg counts if posible