From d42364a7e2358c5bc91c339e475dfc55744f1da0 Mon Sep 17 00:00:00 2001 From: Steve Hancock Date: Wed, 17 Aug 2022 07:54:15 -0700 Subject: [PATCH] eliminate a goto --- lib/Perl/Tidy/Formatter.pm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/Perl/Tidy/Formatter.pm b/lib/Perl/Tidy/Formatter.pm index 9eb4b038..c35ac75b 100644 --- a/lib/Perl/Tidy/Formatter.pm +++ b/lib/Perl/Tidy/Formatter.pm @@ -20134,7 +20134,9 @@ sub find_token_starting_list { # This will be the return index my $i_opening_minus = $i_opening_paren; - goto RETURN if ( $i_opening_minus <= 0 ); + if ( $i_opening_minus <= 0 ) { + return $i_opening_minus; + } my $im1 = $i_opening_paren - 1; my ( $iprev_nb, $type_prev_nb ) = ( $im1, $types_to_go[$im1] ); @@ -20175,8 +20177,6 @@ sub find_token_starting_list { if ( $types_to_go[$i_opening_minus] eq 'b' ) { $i_opening_minus++ } } - RETURN: - DEBUG_FIND_START && print < im=$i_opening_minus tok=$tokens_to_go[$i_opening_minus] EOM @@ -23438,7 +23438,7 @@ EOM if ( $token eq '(' ) { - # For a paren after keyword, only align if-like parens, + # For a paren after keyword, only align if-like parens, # such as: # if ( $a ) { &a } # elsif ( $b ) { &b } -- 2.39.5