From 76bec7f7e529124abb18de916cfae70e855455da Mon Sep 17 00:00:00 2001 From: Steve Hancock Date: Sat, 13 Aug 2022 17:36:36 -0700 Subject: [PATCH] eliminate nonstandard usages of @_ --- lib/Perl/Tidy/Tokenizer.pm | 16 ++++++++-------- lib/Perl/Tidy/VerticalAligner.pm | 4 ++-- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/lib/Perl/Tidy/Tokenizer.pm b/lib/Perl/Tidy/Tokenizer.pm index a9d01e32..fc3dd237 100644 --- a/lib/Perl/Tidy/Tokenizer.pm +++ b/lib/Perl/Tidy/Tokenizer.pm @@ -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 diff --git a/lib/Perl/Tidy/VerticalAligner.pm b/lib/Perl/Tidy/VerticalAligner.pm index 1ea97ad2..fb9cb7da 100644 --- a/lib/Perl/Tidy/VerticalAligner.pm +++ b/lib/Perl/Tidy/VerticalAligner.pm @@ -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 { -- 2.39.5