## 2024 05 11.09
- - Add --timeout-in-seconds=n, or -to=n. When the standard input supplies
+ - Add --timeout-in-seconds=n, or -tos=n. When the standard input supplies
the input stream, and the input has not been received within n seconds,
perltidy will end with a timeout message. The intention is to catch
a situation where perltidy is accidentally invoked without a file to
process and therefore waits for input from the system standard input
(stdin), which never arrives. The default is n=10.
- This check can be turned off with -to=0.
+ This check can be turned off with -tos=0.
- Add parameter --closing-side-comment-exclusion-list=string, or
-cscxl=string, where string is a list of block types to exclude
parameters. If this is not the case, an error message noting this is produced.
This flag has no other effect on the functioning of perltidy.
-=item B<-to=n>, B<--timeout-in-seconds=n>
+=item B<-tos=n>, B<--timeout-in-seconds=n>
When the standard input supplies the input stream, and the input has not been
received within B<n> seconds, perltidy will end with a timeout message. The
$CODE_type = $no_leading_space ? 'SBCX' : 'SBC';
next;
}
- elsif ($last_line_had_side_comment
+ elsif ( $last_line_had_side_comment
&& !$rOpts_maximum_consecutive_blank_lines
&& $rLL->[$Kfirst]->[_LEVEL_] > 0 )
{
# Special check for -wvt
# Deactivated for now to allow -wvt in perltidyrc files. This can
# eventually be removed if allowing this does not cause problems.
- elsif (0
+ elsif ( 0
&& ( $opt eq 'u' || $opt eq 'c' )
&& $long_name eq 'warn-variable-types' )
{
}
# remember the name of the first item, maybe something like '$self'
- elsif ($sigil eq '$'
+ elsif ( $sigil eq '$'
&& !$self_name
&& !$arg_count )
{
}
# we might be able to handle a pad of -1 by removing a blank
- # token
+ # token.
if ( $pad_spaces < 0 ) {
# Deactivated for -kpit due to conflict. This block deletes
# but it may conflict with user spacing requests. For now
# it is just deactivated if the -kpit option is used.
if ( $pad_spaces == -1 ) {
- if ( $ipad > $ibeg
+ if (
+ $ipad > $ibeg
&& $types_to_go[ $ipad - 1 ] eq 'b'
- && !%keyword_paren_inner_tightness )
+ && !%keyword_paren_inner_tightness
+
+ # additional tests added for c385:
+ && (
+ $types_to_go[$inext_next] eq $types_to_go[$ipad]
+ || (
+ $types_to_go[$ipad] eq '!'
+ && ( $types_to_go[ $ipad + 1 ] eq
+ $types_to_go[$inext_next] )
+ )
+ )
+ )
{
$self->pad_token( $ipad - 1, $pad_spaces );
}