]> git.donarmstrong.com Git - perltidy.git/commitdiff
fix glitch with changing -sak
authorSteve Hancock <perltidy@users.sourceforge.net>
Thu, 23 Apr 2020 00:01:31 +0000 (17:01 -0700)
committerSteve Hancock <perltidy@users.sourceforge.net>
Thu, 23 Apr 2020 00:01:31 +0000 (17:01 -0700)
lib/Perl/Tidy/Formatter.pm

index af5c455fccb79209865534da83dda7733be1d5ce..20ca883c162cdac38b80e0fda04d9a39f7db999f 100644 (file)
@@ -5807,7 +5807,7 @@ EOM
     # (at present, including them messes up vertical alignment)
     my @sak = qw(my local our and or err eq ne if else elsif until
       unless while for foreach return switch case given when catch);
-    @space_after_keyword{@sak} = (1) x scalar(@sak);
+    %space_after_keyword = map { $_ => 1 } @sak;
 
     # first remove any or all of these if desired
     if ( my @q = split_words( $rOpts->{'nospace-after-keyword'} ) ) {