return $Knnb;
}
$Knnb++;
- }
+ } ## end while ( $Knnb < $Num )
return;
} ## end sub K_next_code
}
if ( $rLL->[$Knnb]->[_TYPE_] ne 'b' ) { return $Knnb }
$Knnb++;
- }
+ } ## end while ( $Knnb < $Num )
return;
} ## end sub K_next_nonblank
return $Kpnb;
}
$Kpnb--;
- }
+ } ## end while ( $Kpnb >= 0 )
return;
} ## end sub K_previous_code
else {
last;
}
- }
+ } ## end while (1)
if ($err_msg) {
my $msg;
# Shouldn't happen unless file has an error
last;
- }
+ } ## end while ($seqno)
# check count
return if ( $elsif_count < $elsif_count_min );
# @EXPORT = ( @{$EXPORT_TAGS{standard}}, ..
return;
}
- }
+ } ## end while ( ++$Kn <= $Klimit )
return \@list;
} ## end sub expand_quoted_word_list
my $word = $2;
my $brace = $3;
$update_use_count->( $sigil_string, $word, $brace );
- }
+ } ## end while ( $text =~ ...)
return;
}; ## end $scan_quoted_text = sub
&& Fault("line_type=$ltype should be HERE..\n");
return;
}
- }
+ } ## end while ( ++$ix_HERE <= $ix_max)
# scan the here-doc text
$scan_quoted_text->($here_text);
}
}
$seqno_parent = $rparent_of_seqno->{$seqno_parent};
- }
+ } ## end while ( defined($seqno_parent...))
}
# Handle code blocks ...
if ( $self->[_ris_sub_block_]->{$parent_seqno} ) {
return $parent_seqno;
}
- }
+ } ## end while ( $parent_seqno = $self...)
return;
} ## end sub parent_sub_seqno
}
}
last;
- }
+ } ## end while (@package_stack)
push @package_lookup_list, [ $name, $K_opening ];
push @package_stack, $ii_next;
else {
# continue search
}
- }
+ } ## end while ( ++$KK < $K_list_end)
# Increase the count by 1 if the list does not have a trailing comma
if ( defined($KK_this_nb)
$bump_count->();
}
else { next }
- }
+ } ## end while (@chars)
return ( $count_min, $count_max );
} ## end sub count_prototype_args
&& Fault("line_type=$ltype should be HERE..\n");
return;
}
- }
+ } ## end while ( ++$ix_HERE <= $ix_max)
if ($here_text) {
my $pos;
$pos = index( $here_text, '@_' );
else {
# continue search
}
- }
+ } ## end while ( ++$KK < $K_closing)
#--------------------------------
# the whole file has been scanned
}
}
$Knext = $rK_next_seqno_by_K->[$Knext];
- }
+ } ## end while ( $Knext < $Kouter_opening)
}
# fix c1468 - do not measure from a leading opening block brace -
$rLL->[$Kouter_closing]->[_CI_LEVEL_];
}
}
- }
+ } ## end while ( @{$rnested_pairs})
return;
} ## end sub weld_nested_containers
last if ( !defined($parent_seqno) );
last if ( $parent_seqno eq SEQ_ROOT );
$ris_excluded_lp_container->{$parent_seqno} = 1;
- }
+ } ## end while (1)
}
}
EOM
}
}
- }
+ } ## end while ( $forced_breakpoint_undo_count...)
return;
} ## end sub undo_forced_breakpoint_stack
} ## end closure set_forced_breakpoint
}
$i_f = $ri_first->[$line_number];
$i_l = $ri_last->[$line_number];
- }
+ } ## end while ( $i_break_left >= ...)
# Do not leave a blank at the end of a line; back up if necessary
if ( $types_to_go[$i_break_left] eq 'b' ) { $i_break_left-- }
my $tok_i = $tokens_to_go[$ii];
return if ( $tok_i eq '?' || $tok_i eq ':' );
}
- }
+ } ## end while (1)
# Slow loop checking for certain characters
_has_terminal_semicolon => $has_terminal_semicolon,
}
);
- }
+ } ## end while ( my $section = pop...)
return;
} ## end sub recombine_breakpoints
last;
}
- } ## end iteration loop
+ } ## end while (1)
if (DEBUG_RECOMBINE) {
my $ratio = sprintf "%0.3f", $rhash->{_num_compares} / $num_pairs;
return if ( $lev_start != $levels_to_go[$ibeg] );
return if ( $ci_start_plus != $ci_levels_to_go[$ibeg] );
last if ( $closing_index <= $iend );
- }
+ } ## end while ( ++$n <= $max_line)
# we can reduce the indentation of all continuation lines
my $continuation_line_count = $n - $line_open;
if ( ( $i_begin <= $imax ) && ( $types_to_go[$i_begin] eq 'b' ) ) {
$i_begin++;
}
- }
+ } ## end while ( $i_begin <= $imax)
#-------------------------------------------------
# END of main loop to set continuation breakpoints
};
last;
}
- }
+ } ## end while ( ++$i_test <= $imax)
#-----------------------------------------------------
# End INNER_LOOP over the indexes in the _to_go arrays
{
$number_of_fields = $min_fields;
$min_fields -= $odd_or_even;
- }
+ } ## end while ( $min_fields >= $odd_or_even...)
}
return $number_of_fields;
} ## end sub compactify_table
$current_ci_level = $ci_lev;
last;
}
- }
+ } ## end while (1)
return;
} ## end sub lp_decreasing_depth
EOM
}
}
- }
+ } ## end while ( ++$i <= $max_lp_object_list)
$lp_position_predictor -= $deleted_spaces;
$spaces_needed -= $deleted_spaces;
last if ( $spaces_needed <= 0 );
last;
}
$KP = $rK_next_seqno_by_K->[$KP];
- }
+ } ## end while ( defined($KP) && $KP...)
}
$rvao_args->{is_terminal_ternary} = $is_terminal_ternary;
}
$indentation = $reduced_spaces_to_go[$i_ind];
$lev = $levels_to_go[$i_ind];
}
- }
+ } ## end while ( $i_ind < $i_terminal)
}
#--------------------------------------------------------------
$starting_level = $self->guess_old_indentation_level($line);
last;
- }
+ } ## end while ( defined( $line = ...))
$msg = "Line $i implies starting-indentation-level = $starting_level\n";
$self->write_logfile_entry("$msg");
}
( $rpre_tokens, $rmap, $rpre_types ) =
pre_tokenize( $line, $max_pretokens );
last;
- }
+ } ## end while ( defined( $line = ...))
return ( $rpre_tokens, $rpre_types );
} ## end sub peek_ahead_for_n_nonblank_pre_tokens
$rtokens->[ ++$j ] = $tok;
}
last;
- }
+ } ## end while ( defined( $line = ...))
return;
} ## end sub peek_ahead_for_nonblank_token
last;
}
last if ( $k >= $HERE_DOC_WINDOW );
- }
+ } ## end while ( defined( $line = ...))
if ( !$here_doc_expected ) {
# implies that scanning has finished
last if ( $i <= $i_start_loop );
- } ## end of main loop
+ } ## end while ( $i < $max_token_index...)
#-------------
# Check result
$i--;
last;
}
- }
+ } ## end while ( ++$i <= $max_token_index)
return ( $i, $error );
} ## end sub inverse_pretoken_map
else {
$allow_quote_comments = 1;
}
- }
+ } ## end while ( $i < $max_token_index)
}
# There are two different loops which search for the ending quote
$quoted_string .= substr( $tok, $old_pos );
}
}
- }
+ } ## end while ( $i <= $max_token_index)
}
#-----------------------------------------------------------------------
## nothing special
}
$quoted_string .= $tok;
- }
+ } ## end while ( $i < $max_token_index)
}
if ( $i > $max_token_index ) { $i = $max_token_index }
return (
else {
return ( \@tokens, \@token_map, \@type );
}
- }
+ } ## end while ( $max_tokens_wanted...)
return ( \@tokens, \@token_map, \@type );
} ## end sub pre_tokenize
# user-defined subs must have args in parens
--want-call-parens='&'
-# add closing side comments for subs
+# Add closing side comments for subs, asubs, and while blocks
+# while blocks are marked because they can be tricky to get right.
+# The default interval (-csci=6) is used but a value of 10 might
+# be a little better. But changing -csci would change a lot of lines.
--closing-side-comments
---closing-side-comment-list='sub asub'
+--closing-side-comment-list='sub asub while'
# remove non-bare trailing commas
# add trailing commas to key=>value hash lists
--add-interbracket-arrows
--interbracket-arrow-style=']->{ }->['
-# use 'perltidy -dmcp filename' to find mixed call paren usage
-# prefer call parens for these keywords:
+# Use 'perltidy -dmcp filename' to find mixed call paren usage.
+# Prefer call parens for these keywords:
--want-call-parens='open unlink substr defined ref scalar int'