]> git.donarmstrong.com Git - perltidy.git/commitdiff
simplifiy
authorSteve Hancock <perltidy@users.sourceforge.net>
Thu, 15 Sep 2022 13:08:39 +0000 (06:08 -0700)
committerSteve Hancock <perltidy@users.sourceforge.net>
Thu, 15 Sep 2022 13:08:39 +0000 (06:08 -0700)
lib/Perl/Tidy/Formatter.pm

index 6c82ede75937164b17e95952f0bcbc51b0e2a495..2cad413296f7d5b4327c247307a43c0e8de3bd0b 100644 (file)
@@ -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] )