--paren-vertical-tightness=1
--weld-nested-containers
+==> b1192.in <==
+# S1
+ @EXPORT =
+ ( @{$EXPORT_TAGS{standard}}, );
+
+# S2
+ @EXPORT = (
+ @{$EXPORT_TAGS{standard}},
+ );
+
+==> b1192.par <==
+--brace-tightness=2
+--continuation-indentation=4
+--ignore-old-breakpoints
+--indent-columns=10
+--line-up-parentheses
+--maximum-line-length=48
+
==> b120.in <==
# Same as bug96
# State 1
my $bp_count = 0;
my $do_not_break_apart = 0;
+ # Do not break a list unless there are some non-line-ending commas.
+ # This avoids getting different results with only non-essential commas,
+ # and fixes b1192.
+ my $seqno = $type_sequence_stack[$dd];
+ my $real_comma_count =
+ $seqno ? $self->[_rtype_count_by_seqno_]->{$seqno}->{','} : 1;
+
# anything to do?
if ( $item_count_stack[$dd] ) {
}
# handle commas within containers...
- else {
+ elsif ($real_comma_count) {
my $fbc = get_forced_breakpoint_count();
# always open comma lists not preceded by keywords,
my $i_line_start = -1;
my $i_last_colon = -1;
- # loop over all tokens in this batch
+ #########################################
+ # Main loop over all tokens in this batch
+ #########################################
while ( ++$i <= $max_index_to_go ) {
if ( $type ne 'b' ) {
$i_last_nonblank_token = $i - 1;
=over 4
+=item B<Fix formatting instability, b1192>
+
+Testing with random parameters produced unstable formatting with the
+following snippet when run with some unusual parameters:
+
+ @EXPORT =
+ ( @{$EXPORT_TAGS{standard}}, );
+
+It was also be formatted as
+
+ @EXPORT = (
+ @{$EXPORT_TAGS{standard}},
+ );
+
+The problem was that a list formatting style was turning on and off due to the
+the needless terminal comma within the parens. A patch was made to ignore
+commas like this when deciding if list formatting should be used.
+
+This fixes case b1192.
+
+10 Aug 2021.
+
=item B<Fix formatting instability, b1191>
Random testing produced an instability involving an unusual parameter