--paren-tightness=2
--space-function-paren
+==> b1172.in <==
+# S1
+
+ok(
+ '[{"1":[5]}]' eq
+ encode_json[
+ {
+ 1=>[
+ 5
+ ]
+ }
+ ]
+);
+
+# S2
+
+ok('[{"1":[5]}]' eq
+ encode_json[
+ {1=>
+ [
+ 5
+ ]
+ }
+ ]);
+
+
+
+==> b1172.par <==
+--noadd-whitespace
+--continuation-indentation=9
+--extended-continuation-indentation
+--ignore-old-breakpoints
+--indent-columns=9
+--line-up-parentheses
+--maximum-line-length=27
+
==> b120.in <==
# Same as bug96
# State 1
} ## end sub scan_list
} ## end closure scan_list
+my %is_kwiZ;
+
+BEGIN {
+
+ # Added 'w' to fix b1172
+ my @q = qw(k w i Z);
+ @is_kwiZ{@q} = (1) x scalar(@q);
+}
+
sub find_token_starting_list {
# When testing to see if a block will fit on one line, some
# This will be the return index
my $i_opening_minus = $i_opening_paren;
- return $i_opening_minus if ( $i_opening_minus <= 0 );
+ goto RETURN if ( $i_opening_minus <= 0 );
my $im1 = $i_opening_paren - 1;
my ( $iprev_nb, $type_prev_nb ) = ( $im1, $types_to_go[$im1] );
}
if ( $types_to_go[$i_opening_minus] eq 'b' ) { $i_opening_minus++ }
}
- elsif ( $type_prev_nb eq 'k' ) { $i_opening_minus = $iprev_nb }
+
+ # Handle non-parens
+ elsif ( $is_kwiZ{$type_prev_nb} ) { $i_opening_minus = $iprev_nb }
+
+ RETURN:
+
return $i_opening_minus;
}
=over 4
+=item B<Fix case b1172, a failure to converge>
+
+Random testing produced case b1172, a failure to converge with unusual parametrs.
+This update fixes this case. There are no other known cases of instability
+at the present time but testing continues.
+
+10 Jul 2021.
+
+=item B<Avoid line breaks before a slash in certain cases>
+
+This update prevents a line break before a '/' character which follows a bareword or possible indirect object. The purpose is reduce the chance of introducing a syntax error in cases where perl is using spaces to distinguish between a division and the start of a pattern.
+
+This fixes case c039.
+
+10 Jul 2021
+
=item B<Removed warning message if ending in code skipping section>
In the previous version, a warning was produced if a 'code-skipping' opening comment
# do not weld paren to opening one-line non-paren container
$Self->_Add(
- $SortOrderDisplay{ $Field->GenerateFieldForSelectSQL() }
+ $SortOrderDisplay{
+ $Field->GenerateFieldForSelectSQL()
+ }
);
# this will not get welded with -wn
# do not weld paren to opening one-line non-paren container
$Self->_Add(
- $SortOrderDisplay{ $Field->GenerateFieldForSelectSQL() }
+ $SortOrderDisplay{
+ $Field->GenerateFieldForSelectSQL()
+ }
);
# this will not get welded with -wn
../snippets24.t rt136417.def
../snippets24.t rt136417.rt136417
../snippets24.t numbers.def
+../snippets24.t code_skipping.def
../snippets3.t ce_wn1.ce_wn
../snippets3.t ce_wn1.def
../snippets3.t colin.colin
../snippets9.t rt98902.def
../snippets9.t rt98902.rt98902
../snippets9.t rt99961.def
-../snippets24.t code_skipping.def
expect => <<'#19...........',
# do not weld paren to opening one-line non-paren container
$Self->_Add(
- $SortOrderDisplay{ $Field->GenerateFieldForSelectSQL() }
+ $SortOrderDisplay{
+ $Field->GenerateFieldForSelectSQL()
+ }
);
# this will not get welded with -wn
expect => <<'#1...........',
# do not weld paren to opening one-line non-paren container
$Self->_Add(
- $SortOrderDisplay{ $Field->GenerateFieldForSelectSQL() }
+ $SortOrderDisplay{
+ $Field->GenerateFieldForSelectSQL()
+ }
);
# this will not get welded with -wn