Perl-Tidy
view release on metacpan or search on metacpan
docs/BugLog.html view on Meta::CPAN
<pre><code> sub:lvalue{"a"}</code></pre>
<p>This update fixes case b1190.</p>
<p>9 Aug 2021, 7008bcc.</p>
</dd>
<dt id="Fix-rare-loss-of-vertical-alignment-in-welded-containers-c053"><b>Fix rare loss of vertical alignment in welded containers, c053</b></dt>
<dd>
<p>This update corrects a rare loss of vertical alignment in welded containers.</p>
<p>To illustrate the issue, the normal formatting of the following snippet is</p>
<pre><code> # perltidy -sil=1
( $msg, $defstyle ) = do {
$i == 1 ? ( "First", "Color" )
: $i == 2 ? ( "Then", "Rarity" )
: ( "Then", "Name" );
};</code></pre>
<p>If it appears within a welded container, the alignment of the last line was being lost:</p>
<pre><code> # OLD: perltidy -wn -sil=1
{ {
( $msg, $defstyle ) = do {
$i == 1 ? ( "First", "Color" )
: $i == 2 ? ( "Then", "Rarity" )
: ( "Then", "Name" );
};
} }</code></pre>
<p>The corrected result is</p>
<pre><code> # NEW: perltidy -wn -sil=1
{ {
( $msg, $defstyle ) = do {
$i == 1 ? ( "First", "Color" )
: $i == 2 ? ( "Then", "Rarity" )
: ( "Then", "Name" );
};
} }</code></pre>
<p>Several other minor vertical alignment issues are fixed with this updated. The problem was that two slightly different measures of the depth of indentation were being compared in the vertical aligner.</p>
<p>This fixes case c053.</p>
<p>8 Aug 2021, 97f02ee.</p>
</dd>
<dt id="Fix-edge-case-of-formatting-instability-b1189"><b>Fix edge case of formatting instability, b1189</b>.</dt>
<dd>
<p>Testing with random parameters produced a case of unstable formatting involving welding with parameter -notrim-qw. The problem was that the -notrim-qw flag converts a qw quote into a quote with fixed leading whitespace. The lines of these types of...
<p>For example, in the following snippet the terminal '}' is alone on a line:</p>
<pre><code> is eval(q{
$[ = 3;
BEGIN { my $x = "foo\x{666}"; $x =~ /foo\p{Alnum}/; }
$t[3];
}
), "a";</code></pre>
<p># In the previous version this was half-welded: # OLD: perltidy -wn -sil=0</p>
<pre><code> is eval( q{
$[ = 3;
BEGIN { my $x = "foo\x{666}"; $x =~ /foo\p{Alnum}/; }
$t[3];
}
),
"a";</code></pre>
<p>The new check avoids welding in this case, giving</p>
<pre><code> # NEW: perltidy -wn -sil=0
is eval(
q{
$[ = 3;
BEGIN { my $x = "foo\x{666}"; $x =~ /foo\p{Alnum}/; }
$t[3];
}
),
"a";</code></pre>
<p>Welding can still be done if the opening and closing container tokens have other code. For example, welding can be done for the following snippet:</p>
<pre><code> is eval(q{
$[ = 3;
BEGIN { my $x = "foo\x{666}"; $x =~ /foo\p{Alnum}/; }
$t[3];
}), "a";</code></pre>
<p>And welding can still be done on all qw quotes unless the -notrim-qw flag is set.</p>
<p>This fixes case b1189.</p>
<p>7 Aug 2021, e9c25f2.</p>
</dd>
<dt id="Fix-edge-cases-of-formatting-instability-b1187-b1188"><b>Fix edge cases of formatting instability, b1187 b1188</b>.</dt>
<dd>
<p>Testing with random parameters produced some cases of instability involving -wn -lp and several other parameters. The mechanism involved an interaction between the formatter and vertical aligner.</p>
<p>This fixes cases b1187 and b1188.</p>
<p>3 Aug 2021, 5be949b.</p>
</dd>
<dt id="Fix-edge-case-of-formatting-instability-b1186"><b>Fix edge case of formatting instability, b1186</b>.</dt>
<dd>
<p>Testing with random parameters produced a case of instability involving parameter -lp -pvt=n and a short maximum line length.</p>
<p>This fixes case b1186.</p>
<p>2 Aug 2021, f3dbee1.</p>
</dd>
<dt id="Fix-edge-case-of-formatting-instability-b1185"><b>Fix edge case of formatting instability, b1185</b>.</dt>
<dd>
<p>Testing with random parameters produced a case of welding instability involving parameters -wn, -vt=2, -lp and a short maximum line length.</p>
<p>This fixes case b1185.</p>
<p>1 Aug 2021, d2ab2b7.</p>
</dd>
<dt id="Fix-edge-case-of-formatting-instability-b1183"><b>Fix edge case of formatting instability, b1183</b>.</dt>
<dd>
<p>Testing with random parameters produced a case of welding instability involving parameters -wn, -vt=n, -lp. This update fixes the problem.</p>
<p>This fixes case b1183.</p>
<p>30 Jul 2021, 055650b.</p>
</dd>
<dt id="Fix-edge-case-of-formatting-instability-b1184"><b>Fix edge case of formatting instability, b1184</b>.</dt>
<dd>
<p>Testing with random parameters produced a case of welding instability involving a triple weld with parameters -wn, -vt=n, -lp. This update fixes the problem.</p>
<p>This fixes case b1184.</p>
<p>29 Jul 2021, 6dd53fb.</p>
( run in 1.066 second using v1.01-cache-2.11-cpan-97f6503c9c8 )