From: Steve Hancock Date: Thu, 12 Sep 2024 23:36:02 +0000 (-0700) Subject: add missing length() call X-Git-Tag: 20240903.02~5 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=6bcc67b8d4b7cce26e545514bd5f6aeeeeb8a57d;p=perltidy.git add missing length() call --- 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'