]> git.donarmstrong.com Git - perltidy.git/commitdiff
eliminate nonstandard usages of @_
authorSteve Hancock <perltidy@users.sourceforge.net>
Sun, 14 Aug 2022 00:36:36 +0000 (17:36 -0700)
committerSteve Hancock <perltidy@users.sourceforge.net>
Sun, 14 Aug 2022 00:36:36 +0000 (17:36 -0700)
lib/Perl/Tidy/Tokenizer.pm
lib/Perl/Tidy/VerticalAligner.pm

index a9d01e326d4dd70e398317b145954cfa7775fa3e..fc3dd23754cfdfcf62ac157269d8b02c6c581fe8 100644 (file)
@@ -1863,25 +1863,25 @@ EOM
     );
 
     my %is_for_foreach;
-    @_ = qw(for foreach);
-    @is_for_foreach{@_} = (1) x scalar(@_);
+    @q = qw(for foreach);
+    @is_for_foreach{@q} = (1) x scalar(@q);
 
     my %is_my_our_state;
-    @_ = qw(my our state);
-    @is_my_our_state{@_} = (1) x scalar(@_);
+    @q = qw(my our state);
+    @is_my_our_state{@q} = (1) x scalar(@q);
 
     # These keywords may introduce blocks after parenthesized expressions,
     # in the form:
     # keyword ( .... ) { BLOCK }
     # patch for SWITCH/CASE: added 'switch' 'case' 'given' 'when'
     my %is_blocktype_with_paren;
-    @_ =
+    @q =
       qw(if elsif unless while until for foreach switch case given when catch);
-    @is_blocktype_with_paren{@_} = (1) x scalar(@_);
+    @is_blocktype_with_paren{@q} = (1) x scalar(@q);
 
     my %is_case_default;
-    @_ = qw(case default);
-    @is_case_default{@_} = (1) x scalar(@_);
+    @q = qw(case default);
+    @is_case_default{@q} = (1) x scalar(@q);
 
     #------------------------
     # end of tokenizer hashes
index 1ea97ad2e4027a2c601b7272f691f4203f1e125e..fb9cb7daf77531c9212f1b2e71328b3398c5898f 100644 (file)
@@ -1310,8 +1310,8 @@ sub fix_terminal_else {
 my %is_closing_block_type;
 
 BEGIN {
-    @_ = qw< } ] >;
-    @is_closing_block_type{@_} = (1) x scalar(@_);
+    my @q = qw< } ] >;
+    @is_closing_block_type{@q} = (1) x scalar(@q);
 }
 
 sub check_match {