]> git.donarmstrong.com Git - perltidy.git/commitdiff
add 'state' to keyword list for -sak, see git #157
authorSteve Hancock <perltidy@users.sourceforge.net>
Tue, 23 Jul 2024 04:04:47 +0000 (21:04 -0700)
committerSteve Hancock <perltidy@users.sourceforge.net>
Tue, 23 Jul 2024 04:04:47 +0000 (21:04 -0700)
bin/perltidy
lib/Perl/Tidy/Formatter.pm

index 488fed8d9d0452941dcd065734f24bf3a3b5c61e..7d4dd41f23f217b83c88f7c2b731efd0d3a39644 100755 (executable)
@@ -1552,8 +1552,8 @@ binary operator asymmetrically with a space on the left but not on the right.
 When an opening paren follows a Perl keyword, no space is introduced after the
 keyword, unless it is (by default) one of these:
 
-   my local our and or xor eq ne if else elsif until unless
-   while for foreach return switch case given when
+   my local our state and or xor err eq ne if else elsif until unless
+   while for foreach return switch case given when catch
 
 These defaults can be modified with two commands:
 
index 6bbbe8acb0bd69e2b9690f9f57852fe87e0cd4e4..7fa1ae689dc033b35fa5099dc6352ec1e2ebdb6d 100644 (file)
@@ -1999,7 +1999,7 @@ sub initialize_space_after_keyword {
 
     # default keywords for which space is introduced before an opening paren
     # (at present, including them messes up vertical alignment)
-    my @sak = qw(my local our and or xor err eq ne if else elsif until
+    my @sak = qw(my local our state and or xor err eq ne if else elsif until
       unless while for foreach return switch case given when catch);
     %space_after_keyword = map { $_ => 1 } @sak;