Perl-Tidy
view release on metacpan or search on metacpan
docs/BugLog.html view on Meta::CPAN
SIG
PROG</code></pre>
<p>25 May 2021, 6947fe9.</p>
</dd>
<dt id="Modify-welding-rules"><b>Modify welding rules</b></dt>
<dd>
<p>This is an update to the patch 19 Apr 2021, eeeaf09. It restricts that patch to -lp formatting mode.</p>
<p>This fixes case b1131.</p>
<p>21 May 2021, a4ec4c1.</p>
</dd>
<dt id="Fix-inconsistency-involving-counting-commas"><b>Fix inconsistency involving counting commas</b></dt>
<dd>
<p>Random testing produced a formatting instability involving the combination of flags -bbp=2 -xci -vt=2 -bvtc=2. The problem was traced to an error in counting the number of line ending commas in lists.</p>
<p>This fixes case b1130.</p>
<p>15 May 2021, 90cceb1.</p>
</dd>
<dt id="Slightly-modify-line-breaks-for--lp-indentation"><b>Slightly modify line breaks for -lp indentation</b></dt>
<dd>
<p>Random testing produced an edge case of formatting instability for -lp indentation which was traced to checking for an old line break at a '=>'. This has been fixed. Some existing formatting with deeply nested structures may be slightly...
<p>This fixes b1035.</p>
<p>15 May 2021, dd42648.</p>
</dd>
<dt id="Rewrite-coding-for--bom-flag"><b>Rewrite coding for -bom flag</b></dt>
<dd>
<p>Random testing produced some examples of formatting instability involving the -bom flag in combination with certain other flags which are fixed with this update. As part of this update, a previous update to fix case b977 (21 Feb 2021, commit 28114...
<p>Some issues are illustrated in the following examples using '-bom -gnu'. In the first example the leading ')->' was being lost due to the old b977 fix:</p>
<pre><code> # input:
$show = $top->Entry( '-width' => 20,
)->pack('-side' => 'left');
# OLD: perltidy -gnu -bom
$show = $top->Entry('-width' => 20,)->pack('-side' => 'left');
# NEW: perltidy -gnu -bom
$show = $top->Entry(
'-width' => 20,
)->pack('-side' => 'left');</code></pre>
<p>In the following example a leading '->' was being lost. The NEW version keeps the leading '->' but has to give up on the -lp alignment because of complexity:</p>
<pre><code> # input
$_make_phase_arg = join(" ",
map {CPAN::HandleConfig
->safe_quote($_)} @{$prefs->{$phase}{args}},
);
# OLD: perltidy -gnu -bom
$_make_phase_arg = join(" ",
map { CPAN::HandleConfig->safe_quote($_) }
@{$prefs->{$phase}{args}},
);
# NEW: perltidy -gnu -bom
$_make_phase_arg = join(
" ",
map {
CPAN::HandleConfig
->safe_quote($_)
} @{$prefs->{$phase}{args}},
);</code></pre>
<p>In the following example, a leading ')->' was being converted to a leading '->' due to the old b977 fix:</p>
<pre><code> # Starting script
$lb = $t->Scrolled("Listbox", -scrollbars => "osoe"
)->pack(-fill => "both", -expand => 1);
# OLD: perltidy -bom -gnu
$lb = $t->Scrolled( "Listbox", -scrollbars => "osoe" )
->pack( -fill => "both", -expand => 1 );
# NEW: perltidy -bom -gnu
$lb = $t->Scrolled(
"Listbox", -scrollbars => "osoe"
)->pack(-fill => "both", -expand => 1);</code></pre>
<p>In the following example, a leading ')->' was being lost, again due to the old b977 fix:</p>
<pre><code> $myDiag->Label(-text => $text,
)->pack(-fill => 'x',
-padx => 3,
-pady => 3);
# OLD: -gnu -bom
$myDiag->Label(-text => $text,)->pack(
-fill => 'x',
-padx => 3,
-pady => 3
);
# NEW -gnu -bom
$myDiag->Label(
-text => $text,
)->pack(
-fill => 'x',
-padx => 3,
-pady => 3
);</code></pre>
<p>This update fixes case b1120 and revises the fix for b977.</p>
<p>13 May 2021, d0ac5e9.</p>
</dd>
<dt id="Adjust-tolerances-for-some-line-length-tests"><b>Adjust tolerances for some line length tests</b></dt>
<dd>
<p>Random testing produced some edge cases of unstable formatting involving the -lp format. These were fixed by using a slightly larger tolerance in the length test for containers which were broken in the input file.</p>
<p>This fixes cases b1059 b1063 b1117.</p>
<p>13 May 2021, 24a11d3.</p>
</dd>
<dt id="Do-not-apply--lp-formatting-to-containers-with-here-doc-text"><b>Do not apply -lp formatting to containers with here-doc text</b></dt>
<dd>
<p>If a container contains text of a here-doc then the indentation is fixed by the here-doc text, so applying -lp formatting does not work well. So this update turns off the -lp formatting in this case.</p>
( run in 0.627 second using v1.01-cache-2.11-cpan-8f98c5d2c55 )