From f38e65142ce877a0d749e2bb4d7bb9579773a7cf Mon Sep 17 00:00:00 2001 From: Steve Hancock Date: Mon, 8 Apr 2024 16:13:26 -0700 Subject: [PATCH] fix arg count for signatures with optional args in -dbs output --- lib/Perl/Tidy/Formatter.pm | 5 +++++ 1 file changed, 5 insertions(+) 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} ) { -- 2.39.5