## 2020 12 07 xx
+ - Fixed issue git #51, in which closing quote pattern delimiters not always
+ following the settings specified by the --closing-token-indentation=n settings.
+ Now qw closing delimiters ')', '}' and ']' follow these flags, and the
+ delimiter '>' follows the flag for ')'. Other qw pattern delimiters remain
+ indented as the are now. This change will cause some small formatting changes
+ in some existing programs.
+
- Fixed issue git #49, -se breaks warnings exit status behavior.
The exit status flag was not always being set when the -se flag was set.
+ - Some minor improvements have been made to the rules for formatting
+ some edge vertical alignment cases, usually involving two dissimilar lines.
+
- Some minor issues that the average user would not encounter were found
- and fixed. They can be seen in the more complete list of updates at
+ and fixed. They can be seen in the more complete list of updates at
https://github.com/perltidy/perltidy/blob/master/local-docs/BugLog.pod
## 2020 12 07
- - Fixed issue git #47, incorrect welding of anonymous subs.
+ - Fixed issue git #47, incorrect welding of anonymous subs.
An incorrect weld format was being made when the --weld-nested-containers option
(-wn) was used in to format a function which returns a list of anonymous subs.
For example, the following snippet was incorrectly being welded.
my ( $lenmin, $lenmax ) =
$lensum >= $lensum_m ? ( $lensum_m, $lensum ) : ( $lensum, $lensum_m );
- # all or none:
+ my $patterns_match;
+ if ( $line_m->get_list_type() && $line->get_list_type() ) {
+ $patterns_match = 1;
+ my $rpatterns_m = $line_m->get_rpatterns();
+ my $rpatterns = $line->get_rpatterns();
+ for ( my $i = 0 ; $i <= $imax_min ; $i++ ) {
+ my $pat = $rpatterns->[$i];
+ my $pat_m = $rpatterns_m->[$i];
+ if ( $pat ne $pat_m ) { $patterns_match = 0; last }
+ }
+ }
+
my $pad_max = $lenmax;
- if ( $lenmax > 2 * $lenmin ) { $pad_max = 0 }
+ if ( !$patterns_match && $lenmax > 2 * $lenmin ) { $pad_max = 0 }
return $pad_max;
}
=over 4
+=item B<Improved vertical alignment of some edge cases>
+
+The existing rules for aligning two lines with very different lengths were
+rejecting some good alignments, such as the first line of numbers in the example
+below:
+
+ # OLD:
+ @gg_3 = (
+ [
+ 0.0, 1.360755E-2, 9.569446E-4, 9.569446E-4,
+ 1.043498E-3, 1.043498E-3
+ ],
+ [
+ 9.569446E-4, 9.569446E-4, 0.0, 7.065964E-5,
+ 1.422811E-4, 1.422811E-4
+ ],
+ ...
+ );
+
+ # NEW:
+ @gg_3 = (
+ [
+ 0.0, 1.360755E-2, 9.569446E-4, 9.569446E-4,
+ 1.043498E-3, 1.043498E-3
+ ],
+ [
+ 9.569446E-4, 9.569446E-4, 0.0, 7.065964E-5,
+ 1.422811E-4, 1.422811E-4
+ ],
+ ...
+ );
+
+The rule in sub 'two_line_pad' was updated to allow alignment of any lists
+if the patterns match exactly (all numbers in this case). Updated
+27-Dec-2020.
+
=item B<Avoid -lp style formatting of lists containing multiline qw quotes>
The -lp formatting style often does not work well when lists contain multiline qw