From: Steve Hancock Date: Mon, 8 Apr 2024 23:13:26 +0000 (-0700) Subject: fix arg count for signatures with optional args in -dbs output X-Git-Tag: 20240202.05~8 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=f38e65142ce877a0d749e2bb4d7bb9579773a7cf;p=perltidy.git fix arg count for signatures with optional args in -dbs output --- diff --git a/lib/Perl/Tidy/Formatter.pm b/lib/Perl/Tidy/Formatter.pm index 33896788..1159e2a6 100644 --- a/lib/Perl/Tidy/Formatter.pm +++ b/lib/Perl/Tidy/Formatter.pm @@ -13433,6 +13433,11 @@ sub count_list_args { $arg_count++; } + # an '=' in a signature indicates an optional arg + elsif ( $type eq '=' ) { + return if ($is_signature); + } + # check for a paren-less call elsif ( $is_kwU{$type} ) {