## 2024 02 02.06
+ - Fix issue git #138 involving -xlp (--extended-line-up-parentheses).
+ When multiple-line quotes and regexes have long secondary lines, these
+ line lengths could influencing some spacing and indentation, but they
+ should not have since perltidy has no control over their indentation.
+ This has been fixed. This will mainly influence code which uses -xlp
+ and has long multi-line quotes.
+
- Add option --minimize-continuation-indentation, -mci (see git #137).
This flag allows perltidy to remove continuation indentation in some
special cases where it is not really unnecessary. For a simple example,
}
}
+ # If starting in quote type Q we have no control over indentation
+ # so just ignore the length of this token (see git #138)
+ elsif ( $rLL->[$K_first]->[_TYPE_] eq 'Q' ) {
+ if ( $line_of_tokens->{_starting_in_quote} ) {
+ $K_begin_loop = $K_first + 1;
+ next if ( $K_begin_loop > $K_last );
+ }
+ }
+ else {
+ }
+
$K_start_multiline_qw = undef;
# Find the terminal token, before any side comment
--- /dev/null
+my $sth = $dbh->prepare(
+ "select * from accountlines
+ where (borrowernumber = ?) and (amountoutstanding<>0)
+ order by date"
+);
+$VAR1 = [
+ 'method',
+ 1,
+ 'prepare',
+ 'SELECT table_name, table_owner, num_rows FROM iitables
+ where table_owner != \'$ingres\' and table_owner != \'DBA\''
+];
--- /dev/null
+my $sth = $dbh->prepare( "select * from accountlines
+ where (borrowernumber = ?) and (amountoutstanding<>0)
+ order by date"
+);
+$VAR1 = [ 'method',
+ 1,
+ 'prepare',
+ 'SELECT table_name, table_owner, num_rows FROM iitables
+ where table_owner != \'$ingres\' and table_owner != \'DBA\''
+];
--- /dev/null
+my $sth = $dbh->prepare( "select * from accountlines
+ where (borrowernumber = ?) and (amountoutstanding<>0)
+ order by date"
+);
+$VAR1 = [ 'method',
+ 1,
+ 'prepare',
+ 'SELECT table_name, table_owner, num_rows FROM iitables
+ where table_owner != \'$ingres\' and table_owner != \'DBA\''
+];
--- /dev/null
+-xlp
+-vt=2
../snippets29.t c352.def
../snippets29.t c353.c353
../snippets29.t c353.def
+../snippets29.t git137.def
+../snippets29.t git137.git137
../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
-../snippets29.t git137.def
-../snippets29.t git137.git137
+../snippets29.t git138.def
+../snippets29.t git138.git138
#14 c353.def
#15 git137.def
#16 git137.git137
+#17 git138.def
+#18 git138.git138
# To locate test #13 you can search for its name or the string '#13'
'git125' => "-ssp=0",
'git135' => "--valign-wide-equals",
'git137' => "-mci -nolq -ci=4",
- 'vsn1' => <<'----------',
+ 'git138' => <<'----------',
+-xlp
+-vt=2
+----------
+ 'vsn1' => <<'----------',
-vsn
-gnu
----------
. "' found" );
----------
+ 'git138' => <<'----------',
+my $sth = $dbh->prepare( "select * from accountlines
+ where (borrowernumber = ?) and (amountoutstanding<>0)
+ order by date"
+);
+$VAR1 = [ 'method',
+ 1,
+ 'prepare',
+ 'SELECT table_name, table_owner, num_rows FROM iitables
+ where table_owner != \'$ingres\' and table_owner != \'DBA\''
+];
+----------
+
'vsn' => <<'----------',
@data = (
[ "1st", "2nd", "3rd", "4th", "5th", "6th", "7th", "8th", "9th" ],
. "' found" );
#16...........
},
+
+ 'git138.def' => {
+ source => "git138",
+ params => "def",
+ expect => <<'#17...........',
+my $sth = $dbh->prepare(
+ "select * from accountlines
+ where (borrowernumber = ?) and (amountoutstanding<>0)
+ order by date"
+);
+$VAR1 = [
+ 'method',
+ 1,
+ 'prepare',
+ 'SELECT table_name, table_owner, num_rows FROM iitables
+ where table_owner != \'$ingres\' and table_owner != \'DBA\''
+];
+#17...........
+ },
+
+ 'git138.git138' => {
+ source => "git138",
+ params => "git138",
+ expect => <<'#18...........',
+my $sth = $dbh->prepare( "select * from accountlines
+ where (borrowernumber = ?) and (amountoutstanding<>0)
+ order by date"
+);
+$VAR1 = [ 'method',
+ 1,
+ 'prepare',
+ 'SELECT table_name, table_owner, num_rows FROM iitables
+ where table_owner != \'$ingres\' and table_owner != \'DBA\''
+];
+#18...........
+ },
};
my $ntests = 0 + keys %{$rtests};