'paren-tightness' => [ 0, 2 ],
'square-bracket-tightness' => [ 0, 2 ],
+ 'brace-follower-vertical-tightness' => [ 0, 2 ],
'block-brace-vertical-tightness' => [ 0, 2 ],
'brace-vertical-tightness' => [ 0, 2 ],
'brace-vertical-tightness-closing' => [ 0, 2 ],
tee-pod
tee-side-comments
version
+ warning-output
delete-pod
tabs
entab-leading-whitespace
$add_option->( 'add-newlines', 'anl', '!' );
$add_option->( 'block-brace-vertical-tightness', 'bbvt', '=i' );
$add_option->( 'block-brace-vertical-tightness-list', 'bbvtl', '=s' );
+ $add_option->( 'brace-follower-vertical-tightness', 'bfvt', '=i' );
$add_option->( 'brace-vertical-tightness', 'bvt', '=i' );
$add_option->( 'brace-vertical-tightness-closing', 'bvtc', '=i' );
$add_option->( 'cuddled-else', 'ce', '!' );
'square-bracket-tightness' => [ 0, 2 ],
'block-brace-vertical-tightness' => [ 0, 2 ],
+ 'brace-follower-vertical-tightness' => [ 0, 2 ],
'brace-vertical-tightness' => [ 0, 2 ],
'brace-vertical-tightness-closing' => [ 0, 2 ],
'paren-vertical-tightness' => [ 0, 2 ],
block-brace-tightness=0
block-brace-vertical-tightness=0
+ brace-follower-vertical-tightness=1
brace-tightness=1
brace-vertical-tightness-closing=0
brace-vertical-tightness=0
$rOpts_blank_lines_after_opening_block,
$rOpts_block_brace_tightness,
$rOpts_block_brace_vertical_tightness,
+ $rOpts_brace_follower_vertical_tightness,
$rOpts_break_after_labels,
$rOpts_break_at_old_attribute_breakpoints,
$rOpts_break_at_old_comma_breakpoints,
$rOpts_block_brace_tightness = $rOpts->{'block-brace-tightness'};
$rOpts_block_brace_vertical_tightness =
$rOpts->{'block-brace-vertical-tightness'};
+ $rOpts_brace_follower_vertical_tightness =
+ $rOpts->{'brace-follower-vertical-tightness'};
$rOpts_break_after_labels = $rOpts->{'break-after-labels'};
$rOpts_break_at_old_attribute_breakpoints =
$rOpts->{'break-at-old-attribute-breakpoints'};
$rOpts->{'closing-side-comment-maximum-text'};
$rOpts_comma_arrow_breakpoints = $rOpts->{'comma-arrow-breakpoints'};
$rOpts_continuation_indentation = $rOpts->{'continuation-indentation'};
- $rOpts_cuddled_paren_brace =
- $rOpts->{'cuddled-paren-brace'};
+ $rOpts_cuddled_paren_brace = $rOpts->{'cuddled-paren-brace'};
$rOpts_delete_closing_side_comments =
$rOpts->{'delete-closing-side-comments'};
$rOpts_delete_old_whitespace = $rOpts->{'delete-old-whitespace'};
# the indentation of a leading line like 'or do {'.
# This doesn't work well with -icb through
if (
- $block_type_to_go[$iend_1] eq 'eval'
- && !ref( $leading_spaces_to_go[$iend_1] )
- && !$rOpts_indent_closing_brace
- && $tokens_to_go[$iend_2] eq '{'
+ $block_type_to_go[$iend_1]
+ && $rOpts_brace_follower_vertical_tightness > 0
+ && (
+
+ # -bfvt=1, allow cuddled eval chains [default]
+ (
+ $tokens_to_go[$iend_2] eq '{'
+ && $block_type_to_go[$iend_1] eq 'eval'
+ && !ref( $leading_spaces_to_go[$iend_1] )
+ && !$rOpts_indent_closing_brace
+ )
+
+ # -bfvt=2, allow most brace followers [part of git #110]
+ || ( $rOpts_brace_follower_vertical_tightness > 1
+ && $ibeg_1 == $iend_1 )
+
+ )
+
&& (
( $type_ibeg_2 =~ /^(\&\&|\|\|)$/ )
|| ( $type_ibeg_2 eq 'k'
--- /dev/null
+# combines with -bfvt>0
+eval {
+ require XSLoader;
+ XSLoader::load( 'Sys::Syslog', $VERSION );
+ 1;
+}
+ or do {
+ require DynaLoader;
+ push @ISA, 'DynaLoader';
+ bootstrap Sys::Syslog $VERSION;
+ };
+
+# combines with -bfvt=2
+eval {
+ ( $line, $cond ) = $self->_normalize_if_elif($line);
+ 1;
+}
+ or die sprintf "Error at line %d\nLine %d: %s\n%s",
+ ( $line_info->start_line_num() ) x 2, $line, $@;
+
+# stable for bfvt<2; combines for bfvt=2; has ci
+my $domain = shift
+ || eval {
+ require Net::Domain;
+ Net::Domain::hostfqdn();
+}
+ || "";
+
+# stays combined for all bfvt; has ci
+my $domain = shift
+ || eval {
+ require Net::Domain;
+ Net::Domain::hostfqdn();
+} || "";
--- /dev/null
+# combines with -bfvt>0
+eval {
+ require XSLoader;
+ XSLoader::load( 'Sys::Syslog', $VERSION );
+ 1;
+}
+ or do {
+ require DynaLoader;
+ push @ISA, 'DynaLoader';
+ bootstrap Sys::Syslog $VERSION;
+ };
+
+# combines with -bfvt=2
+eval {
+ ( $line, $cond ) = $self->_normalize_if_elif($line);
+ 1;
+}
+ or die sprintf "Error at line %d\nLine %d: %s\n%s",
+ ( $line_info->start_line_num() ) x 2, $line, $@;
+
+# stable for bfvt<2; combines for bfvt=2; has ci
+my $domain = shift
+ || eval {
+ require Net::Domain;
+ Net::Domain::hostfqdn();
+ }
+ || "";
+
+# stays combined for all bfvt; has ci
+my $domain = shift
+ || eval {
+ require Net::Domain;
+ Net::Domain::hostfqdn();
+ } || "";
--- /dev/null
+# combines with -bfvt>0
+eval {
+ require XSLoader;
+ XSLoader::load( 'Sys::Syslog', $VERSION );
+ 1;
+} or do {
+ require DynaLoader;
+ push @ISA, 'DynaLoader';
+ bootstrap Sys::Syslog $VERSION;
+};
+
+# combines with -bfvt=2
+eval {
+ ( $line, $cond ) = $self->_normalize_if_elif($line);
+ 1;
+} or die sprintf "Error at line %d\nLine %d: %s\n%s",
+ ( $line_info->start_line_num() ) x 2, $line, $@;
+
+# stable for bfvt<2; combines for bfvt=2; has ci
+my $domain = shift
+ || eval {
+ require Net::Domain;
+ Net::Domain::hostfqdn();
+ } || "";
+
+# stays combined for all bfvt; has ci
+my $domain = shift
+ || eval {
+ require Net::Domain;
+ Net::Domain::hostfqdn();
+ } || "";
--- /dev/null
+# combines with -bfvt>0
+eval {
+ require XSLoader;
+ XSLoader::load( 'Sys::Syslog', $VERSION );
+ 1;
+} or do {
+ require DynaLoader;
+ push @ISA, 'DynaLoader';
+ bootstrap Sys::Syslog $VERSION;
+};
+
+# combines with -bfvt=2
+eval {
+ ( $line, $cond ) = $self->_normalize_if_elif($line);
+ 1;
+}
+ or die sprintf "Error at line %d\nLine %d: %s\n%s",
+ ( $line_info->start_line_num() ) x 2, $line, $@;
+
+# stable for bfvt<2; combines for bfvt=2; has ci
+my $domain = shift
+ || eval {
+ require Net::Domain;
+ Net::Domain::hostfqdn();
+ }
+ || "";
+
+# stays combined for all bfvt; has ci
+my $domain = shift
+ || eval {
+ require Net::Domain;
+ Net::Domain::hostfqdn();
+ } || "";
--- /dev/null
+foreach my $dir (
+ '05_lexer', '07_token', '08_regression', '11_util',
+ '13_data', '15_transform'
+) {
+ my @perl = find_files( catdir( 't', 'data', $dir ) );
+ push @files, @perl;
+}
+
--- /dev/null
+foreach my $dir (
+ '05_lexer', '07_token', '08_regression', '11_util',
+ '13_data', '15_transform'
+ )
+{
+ my @perl = find_files( catdir( 't', 'data', $dir ) );
+ push @files, @perl;
+}
+
../snippets9.t rt98902.def
../snippets9.t rt98902.rt98902
../snippets9.t rt99961.def
+../snippets27.t bfvt.bfvt0
+../snippets27.t bfvt.bfvt2
+../snippets27.t bfvt.def
+../snippets27.t cpb.cpb
+../snippets27.t cpb.def
#9 wtc.wtc7
#10 rt144979.def
#11 rt144979.rt144979
+#12 bfvt.bfvt0
+#13 bfvt.bfvt2
+#14 bfvt.def
+#15 cpb.cpb
+#16 cpb.def
# To locate test #13 you can search for its name or the string '#13'
# BEGIN SECTION 1: Parameter combinations #
###########################################
$rparams = {
+ 'bfvt0' => "-bfvt=0",
+ 'bfvt2' => "-bfvt=2",
+ 'cpb' => "-cpb",
'def' => "",
'dwic' => "-wn -dwic",
'rt144979' => "-xci -ce -lp",
############################
$rsources = {
+ 'bfvt' => <<'----------',
+# combines with -bfvt>0
+eval {
+ require XSLoader;
+ XSLoader::load( 'Sys::Syslog', $VERSION );
+ 1;
+}
+ or do {
+ require DynaLoader;
+ push @ISA, 'DynaLoader';
+ bootstrap Sys::Syslog $VERSION;
+ };
+
+# combines with -bfvt=2
+eval {
+ ( $line, $cond ) = $self->_normalize_if_elif($line);
+ 1;
+}
+ or die sprintf "Error at line %d\nLine %d: %s\n%s",
+ ( $line_info->start_line_num() ) x 2, $line, $@;
+
+# stable for bfvt<2; combines for bfvt=2; has ci
+my $domain = shift
+ || eval {
+ require Net::Domain;
+ Net::Domain::hostfqdn();
+}
+ || "";
+
+# stays combined for all bfvt; has ci
+my $domain = shift
+ || eval {
+ require Net::Domain;
+ Net::Domain::hostfqdn();
+} || "";
+----------
+
+ 'cpb' => <<'----------',
+foreach my $dir (
+ '05_lexer', '07_token', '08_regression', '11_util',
+ '13_data', '15_transform'
+ )
+{
+ my @perl = find_files( catdir( 't', 'data', $dir ) );
+ push @files, @perl;
+}
+
+----------
+
'dwic' => <<'----------',
skip_symbols(
[ qw(
}
return;
},
-);
+);
# part 2
{{{
#11...........
},
+
+ 'bfvt.bfvt0' => {
+ source => "bfvt",
+ params => "bfvt0",
+ expect => <<'#12...........',
+# combines with -bfvt>0
+eval {
+ require XSLoader;
+ XSLoader::load( 'Sys::Syslog', $VERSION );
+ 1;
+}
+ or do {
+ require DynaLoader;
+ push @ISA, 'DynaLoader';
+ bootstrap Sys::Syslog $VERSION;
+ };
+
+# combines with -bfvt=2
+eval {
+ ( $line, $cond ) = $self->_normalize_if_elif($line);
+ 1;
+}
+ or die sprintf "Error at line %d\nLine %d: %s\n%s",
+ ( $line_info->start_line_num() ) x 2, $line, $@;
+
+# stable for bfvt<2; combines for bfvt=2; has ci
+my $domain = shift
+ || eval {
+ require Net::Domain;
+ Net::Domain::hostfqdn();
+ }
+ || "";
+
+# stays combined for all bfvt; has ci
+my $domain = shift
+ || eval {
+ require Net::Domain;
+ Net::Domain::hostfqdn();
+ } || "";
+#12...........
+ },
+
+ 'bfvt.bfvt2' => {
+ source => "bfvt",
+ params => "bfvt2",
+ expect => <<'#13...........',
+# combines with -bfvt>0
+eval {
+ require XSLoader;
+ XSLoader::load( 'Sys::Syslog', $VERSION );
+ 1;
+} or do {
+ require DynaLoader;
+ push @ISA, 'DynaLoader';
+ bootstrap Sys::Syslog $VERSION;
+};
+
+# combines with -bfvt=2
+eval {
+ ( $line, $cond ) = $self->_normalize_if_elif($line);
+ 1;
+} or die sprintf "Error at line %d\nLine %d: %s\n%s",
+ ( $line_info->start_line_num() ) x 2, $line, $@;
+
+# stable for bfvt<2; combines for bfvt=2; has ci
+my $domain = shift
+ || eval {
+ require Net::Domain;
+ Net::Domain::hostfqdn();
+ } || "";
+
+# stays combined for all bfvt; has ci
+my $domain = shift
+ || eval {
+ require Net::Domain;
+ Net::Domain::hostfqdn();
+ } || "";
+#13...........
+ },
+
+ 'bfvt.def' => {
+ source => "bfvt",
+ params => "def",
+ expect => <<'#14...........',
+# combines with -bfvt>0
+eval {
+ require XSLoader;
+ XSLoader::load( 'Sys::Syslog', $VERSION );
+ 1;
+} or do {
+ require DynaLoader;
+ push @ISA, 'DynaLoader';
+ bootstrap Sys::Syslog $VERSION;
+};
+
+# combines with -bfvt=2
+eval {
+ ( $line, $cond ) = $self->_normalize_if_elif($line);
+ 1;
+}
+ or die sprintf "Error at line %d\nLine %d: %s\n%s",
+ ( $line_info->start_line_num() ) x 2, $line, $@;
+
+# stable for bfvt<2; combines for bfvt=2; has ci
+my $domain = shift
+ || eval {
+ require Net::Domain;
+ Net::Domain::hostfqdn();
+ }
+ || "";
+
+# stays combined for all bfvt; has ci
+my $domain = shift
+ || eval {
+ require Net::Domain;
+ Net::Domain::hostfqdn();
+ } || "";
+#14...........
+ },
+
+ 'cpb.cpb' => {
+ source => "cpb",
+ params => "cpb",
+ expect => <<'#15...........',
+foreach my $dir (
+ '05_lexer', '07_token', '08_regression', '11_util',
+ '13_data', '15_transform'
+) {
+ my @perl = find_files( catdir( 't', 'data', $dir ) );
+ push @files, @perl;
+}
+
+#15...........
+ },
+
+ 'cpb.def' => {
+ source => "cpb",
+ params => "def",
+ expect => <<'#16...........',
+foreach my $dir (
+ '05_lexer', '07_token', '08_regression', '11_util',
+ '13_data', '15_transform'
+ )
+{
+ my @perl = find_files( catdir( 't', 'data', $dir ) );
+ push @files, @perl;
+}
+
+#16...........
+ },
};
my $ntests = 0 + keys %{$rtests};