## 2021 01 xx
+ - Fixed issue git #55 regarding lack of coordination of the --break-before-xxx
+ flags and the --line-up-parens flag.
+
+ - Fixed issue git #54 regarding irregular application of the --break-before-paren
+ and similar --break-before-xxx flags, in which lists without commas were not
+ being formatted according to these flags.
+
+ - Fixed issue git #53. A flag was added to turn off alignment of spaced function
+ parens. If the --space-function-paren, -sfp flag is set, a side-effect is that the
+ spaced function parens may get vertically aligned. This can be undesirable,
+ so a new parameter '--function-paren-vertical-alignment', or '-fpva', has been
+ added to turn this vertical alignment off. The default is '-fpva', so that
+ existing formatting is not changed. Use '-nfpva' to turn off unwanted
+ vertical alignment. To illustrate the possibilities:
+
+ # perltidy [default]
+ myfun( $aaa, $b, $cc );
+ mylongfun( $a, $b, $c );
+
+ # perltidy -sfp
+ myfun ( $aaa, $b, $cc );
+ mylongfun ( $a, $b, $c );
+
+ # perltidy -sfp -nfpva
+ myfun ( $aaa, $b, $cc );
+ mylongfun ( $a, $b, $c );
+
- Fixed issue git #51, a closing qw bare paren was not being outdented when
the -nodelete-old-newlines flag was set.
- - Fixed a rare problem with -lp formatting which could cause alternating
- output states. Except for some very deeply nested data structures,
- most scripts formatted with this option will not be changed.
+ - Fixed numerous edge cases involving unusual parameter combinations which
+ could cause alternating output states. Most scripts will not be
+ changed by these fixes.
+
+ - A more complete list of updates is at
+
+ https://github.com/perltidy/perltidy/blob/master/local-docs/BugLog.pod
## 2021 01 11
# perl527/(method.t.2, reg_mesg.t, mime-header.t)
# handle outdenting of long lines:
+ my $is_outdented_line;
if ($outdent_long_lines) {
my $excess =
$str_length -
}
$outdented_line_count++;
$self->[_outdented_line_count_] = $outdented_line_count;
+ $is_outdented_line = 1;
}
}
}
}
- # write or cache this line
- if ( !$open_or_close || $side_comment_length > 0 ) {
+ # write or cache this line ...
+ # fix for case b999: do not cache an outdented line
+ if ( !$open_or_close || $side_comment_length > 0 || $is_outdented_line )
+ {
$self->valign_output_step_C( $line, $leading_space_count, $level,
$Kend );
}
=over 4
+=item B<Fix problem with -vtc=n and outdented long lines>
+
+Random testing produced an issue with -vtc=1 and an outdented long
+line. The parameters for b999 are
+
+ --maximum-line-length=75
+ --paren-vertical-tightness-closing=1
+
+File 'b999.in' state 1 is
+
+ while ( $line =~
+ s/^([^\t]*)(\t+)/$1.(" " x ((length($2)<<3)-(length($1)&7)))/e
+ )
+
+and state 2 is
+
+ while ( $line =~
+ s/^([^\t]*)(\t+)/$1.(" " x ((length($2)<<3)-(length($1)&7)))/e)
+
+The problem was fixed by turning off caching for outdented long lines.
+This fixes case b999.
+
+7 Mar 2021.
+
=item B<Fix problem with combination -lp and -wbb='='>
Random testing produced case b932 in which the combination -lp and -wbb='='
This update fixes case b932.
-7 Mar 2021.
+7 Mar 2021, 63129c3.
=item B<Fix edge formatting cases with parameter -bbx=2>