]> git.donarmstrong.com Git - perltidy.git/commitdiff
make () align with qw in a 'use' statement (git #93)
authorSteve Hancock <perltidy@users.sourceforge.net>
Sun, 17 Apr 2022 13:52:52 +0000 (06:52 -0700)
committerSteve Hancock <perltidy@users.sourceforge.net>
Sun, 17 Apr 2022 13:52:52 +0000 (06:52 -0700)
lib/Perl/Tidy/Formatter.pm

index 90299523b3b7ef2aad06175c9f71116b4fbab386..7eb923c4f424dffb3ecfe8ea863b035ea610846b 100644 (file)
@@ -22873,6 +22873,14 @@ EOM
                                 $alignment_type = "";
                             }
                         }
+
+                        # make () align with qw in a 'use' statement (git #93)
+                        if (   $tokens_to_go[0] eq 'use'
+                            && $types_to_go[0] eq 'k'
+                            && $inext_to_go[$i] == $i + 1 )
+                        {
+                            $alignment_type = 'q';
+                        }
                     }
 
                     # be sure the alignment tokens are unique