From 6bcc67b8d4b7cce26e545514bd5f6aeeeeb8a57d Mon Sep 17 00:00:00 2001 From: Steve Hancock Date: Thu, 12 Sep 2024 16:36:02 -0700 Subject: [PATCH] add missing length() call --- lib/Perl/Tidy/Formatter.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Perl/Tidy/Formatter.pm b/lib/Perl/Tidy/Formatter.pm index b54db333..6524a032 100644 --- a/lib/Perl/Tidy/Formatter.pm +++ b/lib/Perl/Tidy/Formatter.pm @@ -14144,7 +14144,7 @@ sub match_trailing_comma_rule { my $token = $rLL_new->[$K_opening]->[_TOKEN_]; if ( $token eq '(' ) { my $Km = $self->K_previous_nonblank( $K_opening, $rLL_new ); - my $type_p = $Km ? $rLL_new->[$Km]->[_TYPE_] : 'b'; + my $type_p = defined($Km) ? $rLL_new->[$Km]->[_TYPE_] : 'b'; ## see also sub count_return_values_wanted my $is_function_call = $type_p eq 'U' -- 2.39.5