From: Steve Hancock Date: Tue, 24 Mar 2020 20:09:57 +0000 (-0700) Subject: minor cleanups X-Git-Tag: 20200619~112 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=94758abeeda1a0122afff3e02d70e2c14a49b7b3;p=perltidy.git minor cleanups --- diff --git a/lib/Perl/Tidy/Formatter.pm b/lib/Perl/Tidy/Formatter.pm index e36f6b1d..bef619f7 100644 --- a/lib/Perl/Tidy/Formatter.pm +++ b/lib/Perl/Tidy/Formatter.pm @@ -14434,18 +14434,20 @@ sub find_token_starting_list { # Given a list with some commas, set breakpoints at some of the # commas, if necessary, to make it easy to read. - my %call_hash = @_; - my $depth = $call_hash{depth}; - my $i_opening_paren = $call_hash{i_opening_paren}; - my $i_closing_paren = $call_hash{i_closing_paren}; - my $item_count = $call_hash{item_count}; - my $identifier_count = $call_hash{identifier_count}; - my $rcomma_index = $call_hash{rcomma_index}; - my $next_nonblank_type = $call_hash{next_nonblank_type}; - my $list_type = $call_hash{list_type}; - my $interrupted = $call_hash{interrupted}; - my $rdo_not_break_apart = $call_hash{rdo_not_break_apart}; - my $must_break_open = $call_hash{must_break_open}; + + my %input_hash = @_; + + my $depth = $input_hash{depth}; + my $i_opening_paren = $input_hash{i_opening_paren}; + my $i_closing_paren = $input_hash{i_closing_paren}; + my $item_count = $input_hash{item_count}; + my $identifier_count = $input_hash{identifier_count}; + my $rcomma_index = $input_hash{rcomma_index}; + my $next_nonblank_type = $input_hash{next_nonblank_type}; + my $list_type = $input_hash{list_type}; + my $interrupted = $input_hash{interrupted}; + my $rdo_not_break_apart = $input_hash{rdo_not_break_apart}; + my $must_break_open = $input_hash{must_break_open}; # nothing to do if no commas seen return if ( $item_count < 1 ); diff --git a/lib/Perl/Tidy/IndentationItem.pm b/lib/Perl/Tidy/IndentationItem.pm index c4331755..dca3473b 100644 --- a/lib/Perl/Tidy/IndentationItem.pm +++ b/lib/Perl/Tidy/IndentationItem.pm @@ -14,16 +14,17 @@ sub new { # Create an 'indentation_item' which describes one level of leading # whitespace when the '-lp' indentation is used. - my ( $class, %call_hash ) = @_; - my $spaces = $call_hash{spaces}; - my $level = $call_hash{level}; - my $ci_level = $call_hash{ci_level}; - my $available_spaces = $call_hash{available_spaces}; - my $index = $call_hash{index}; - my $gnu_sequence_number = $call_hash{gnu_sequence_number}; - my $align_paren = $call_hash{align_paren}; - my $stack_depth = $call_hash{stack_depth}; - my $starting_index = $call_hash{starting_index}; + my ( $class, %input_hash ) = @_; + + my $spaces = $input_hash{spaces}; + my $level = $input_hash{level}; + my $ci_level = $input_hash{ci_level}; + my $available_spaces = $input_hash{available_spaces}; + my $index = $input_hash{index}; + my $gnu_sequence_number = $input_hash{gnu_sequence_number}; + my $align_paren = $input_hash{align_paren}; + my $stack_depth = $input_hash{stack_depth}; + my $starting_index = $input_hash{starting_index}; my $closed = -1; my $arrow_count = 0; diff --git a/lib/Perl/Tidy/Tokenizer.pm b/lib/Perl/Tidy/Tokenizer.pm index 8fd31f73..0677eeec 100644 --- a/lib/Perl/Tidy/Tokenizer.pm +++ b/lib/Perl/Tidy/Tokenizer.pm @@ -6289,16 +6289,17 @@ sub scan_identifier_do { # $in_attribute_list, %saw_function_definition, # $statement_type - my (%call_hash) = @_; - my $input_line = $call_hash{input_line}; - my $i = $call_hash{i}; - my $i_beg = $call_hash{i_beg}; - my $tok = $call_hash{tok}; - my $type = $call_hash{type}; - my $rtokens = $call_hash{rtokens}; - my $rtoken_map = $call_hash{rtoken_map}; - my $id_scan_state = $call_hash{id_scan_state}; - my $max_token_index = $call_hash{max_token_index}; + my %input_hash = @_; + + my $input_line = $input_hash{input_line}; + my $i = $input_hash{i}; + my $i_beg = $input_hash{i_beg}; + my $tok = $input_hash{tok}; + my $type = $input_hash{type}; + my $rtokens = $input_hash{rtokens}; + my $rtoken_map = $input_hash{rtoken_map}; + my $id_scan_state = $input_hash{id_scan_state}; + my $max_token_index = $input_hash{max_token_index}; $id_scan_state = ""; # normally we get everything in one call my $subname = undef;