--space-keyword-paren
--weld-nested-containers
+==> b1241.in <==
+# created from b901
+# Started blinking with new -lp logic
+# S1
+ my @tagged_texts = walk_html(
+ $tree,
+ sub
+ { [ 'MAYBE', $_[ 0 ] ] },
+ \&promote_if_h1tag
+ );
+
+# S2
+ my @tagged_texts =
+ walk_html(
+ $tree,
+ sub { [
+ 'MAYBE', $_[ 0 ] ] },
+ \&promote_if_h1tag
+ );
+
+==> b1241.par <==
+--continuation-indentation=9
+--line-up-parentheses
+--maximum-line-length=51
+--opening-anonymous-sub-brace-on-new-line
+--square-bracket-tightness=0
+--weld-nested-containers
+
==> b131.in <==
unless
( open( SCORE, "+>>$Score_File" ) )
# involves setting certain hash values which will be checked
# later during formatting.
- my $rLL = $self->[_rLL_];
- my $rlines = $self->[_rlines_];
- my $K_opening_container = $self->[_K_opening_container_];
- my $K_closing_container = $self->[_K_closing_container_];
- my $rblock_type_of_seqno = $self->[_rblock_type_of_seqno_];
-
+ my $rLL = $self->[_rLL_];
+ my $rlines = $self->[_rlines_];
+ my $K_opening_container = $self->[_K_opening_container_];
+ my $K_closing_container = $self->[_K_closing_container_];
+ my $rblock_type_of_seqno = $self->[_rblock_type_of_seqno_];
my $ris_excluded_lp_container = $self->[_ris_excluded_lp_container_];
+ my $ris_asub_block = $self->[_ris_asub_block_];
# Find nested pairs of container tokens for any welding.
my $rnested_pairs = $self->find_nested_pairs();
if ( $token_oo eq '(' || $iline_oo != $iline_io );
}
+ # DO-NOT-WELD RULE 2A:
+ # Do not weld an opening asub brace in -lp mode to avoid interfering
+ # with one-line block formation. Fixes b1241.
+ if ( !$do_not_weld_rule
+ && $is_one_line_weld
+ && $rOpts_line_up_parentheses
+ && $ris_asub_block->{$outer_seqno} )
+ {
+ $do_not_weld_rule = '2A';
+ }
+
# DO-NOT-WELD RULE 3:
# Do not weld if this makes our line too long.
# Use a tolerance which depends on if the old tokens were welded