From: Steve Hancock Date: Thu, 15 Sep 2022 13:08:39 +0000 (-0700) Subject: simplifiy X-Git-Tag: 20220613.05~1 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=b297876c2bc7afafa94ce5219325e50dc5aa20ae;p=perltidy.git simplifiy --- diff --git a/lib/Perl/Tidy/Formatter.pm b/lib/Perl/Tidy/Formatter.pm index 6c82ede7..2cad4132 100644 --- a/lib/Perl/Tidy/Formatter.pm +++ b/lib/Perl/Tidy/Formatter.pm @@ -9165,9 +9165,7 @@ sub weld_nested_containers { # RULE: do not weld to a square bracket which does not contain commas if ( $inner_opening->[_TYPE_] eq '[' ) { my $rtype_count = $self->[_rtype_count_by_seqno_]->{$inner_seqno}; - next unless ($rtype_count); - my $comma_count = $rtype_count->{','}; - next unless ($comma_count); + next unless ( $rtype_count && $rtype_count->{','} ); # Do not weld if there is text before a '[' such as here: # curr_opt ( @beg [2,5] )