]> git.donarmstrong.com Git - perltidy.git/commitdiff
add alignment for use ... qw (see issue git #93)
authorSteve Hancock <perltidy@users.sourceforge.net>
Fri, 15 Apr 2022 21:09:50 +0000 (14:09 -0700)
committerSteve Hancock <perltidy@users.sourceforge.net>
Fri, 15 Apr 2022 21:09:50 +0000 (14:09 -0700)
lib/Perl/Tidy/Formatter.pm

index bd7cdd210485afa1afe77b584f2b976aa66907c0..637ff526ab483c85ab8d898994c568d58d89aed4 100644 (file)
@@ -22795,6 +22795,13 @@ EOM
                     }
                 }
 
+                # align qw in a 'use' statement (issue git #93)
+                elsif ( $type eq 'q' ) {
+                    if ( $types_to_go[0] eq 'k' && $tokens_to_go[0] eq 'use' ) {
+                        $alignment_type = $type;
+                    }
+                }
+
                 # align before one of these types..
                 elsif ( $is_vertical_alignment_type{$type}
                     && !$is_not_vertical_alignment_token{$token} )