# Perltidy Change Log
-## 2021 06 25.02
+## 2021 07 17
+
+ - This release is being made mainly because of the next item, in which an
+ error message about an uninitialized value error message could be produced
+ in certain cases when format-skipping is used. The error message was
+ annoying but harmless to formatting. This version may produce occasional
+ differences in formatting compared to previous versions, mainly for lines
+ which are near the specified line length limit. This is due to ongoing
+ efforts to eliminate edge cases of formatting instability.
- Fixed an undefined variable message, see git #67. When a format skipping
comment '#<<' is placed before the first line of code in a script, a
message 'Use of uninitialized value $Ktoken_vars in numeric ...' can
occur.
- - A warning will no longer be given if a script has a code-skipping begin
+ - A warning will no longer be given if a script has an opening code-skipping
comment '#<<V' which is not terminated with a closing comment '#>>V'. This
- makes it behave like the related format-skipping option.
+ makes code-skipping and format-skipping behave in a similar way: a
+ '#>>V' or '#>>>' comment without a corresponding closing comment will cause
+ the rest of a file to be skipped. If there is a question about which lines
+ are skipped, a .LOG file can be produced with the -g flag and it will have
+ this information.
- Removed the limit on -ci=n when -xci is set, reference: rt #136415.
This update removes a limit in the previous two versions in which the
This limit had been placed to avoid some formatting instabilities,
but recent coding improvements allow the limit to be removed.
+ - Numerous minor fixes have been made. A complete list is at:
+
+ https://github.com/perltidy/perltidy/blob/master/local-docs/BugLog.pod
+
## 2021 06 25
- This release adds several new requested parameters. No significant bugs have
to add one if it is missing.
For example
-
+
perltidy somefile.pl -opath=/tmp/
will produce F</tmp/somefile.pl.tdy>. Otherwise, F<somefile.pl.tdy> will
perltidy -guess file.pl
To process a file in B<euc-jp> you could use
-
+
perltidy -enc=euc-jp file.pl
A perltidy output file is unencoded if the input file is unencoded, and
The flags B<-cti=1> and B<-cti=2> work well with the B<-lp> flag (previous
section).
-
+
# perltidy -lp -cti=1
@month_of_year = (
'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun',
literally rather than as patterns.
For example, to match the side comment '#++', the parameter would be
-
+
-nibp='#\+\+'
}
Suppose the user requests that / signs have a space to the left but not to the right. Perltidy will refuse to do this, but if this were done the result would be
-
+
sub print_div {
my ($x,$y)=@_;
print $x /$y;
block types separated by commas or spaces. For example, to cuddle code blocks
of type sort, map and grep, in addition to the default types, the string could
be set to
-
+
-cbl="sort map grep"
or equivalently
treated as a single item in a table. The number of fields in this table
will be determined by the same rules that are used for any other table.
Here is an example.
-
+
# perltidy -cab=3
my %last_day = (
"01" => 31, "02" => 29, "03" => 31, "04" => 30,
By default, if an attribute list is broken at a C<:> in the source file, then
it will remain broken. For example, given the following code, the line breaks
at the ':'s will be retained:
-
+
my @field
: field
: Default(1)
integer B<n> has a default value of 10, so perltidy will skip formatting files
which have a size greater than 10 MB. The command to increase the limit to 20
MB for example would be
-
+
perltidy -maxfs=20
This only applies to files specified by filename on the command line.
use the B<-ss>, or B<--stylesheet>, flag. This is useful if the style
sheet could not be written for some reason, such as if the B<-pre> flag
was used. Thus, for example,
-
+
perltidy -html -ss >mystyle.css
will write a style sheet with the default properties to file
=head1 VERSION
-This man page documents perltidy version 20210625.02
+This man page documents perltidy version 20210717
=head1 BUG REPORTS
<ul id="index">
+ <li><a href="#Issues-fixed-after-release-20210625">Issues fixed after release 20210625</a></li>
<li><a href="#Issues-fixed-after-release-20210402">Issues fixed after release 20210402</a></li>
<li><a href="#Issues-fixed-after-release-20210111">Issues fixed after release 20210111</a></li>
<li><a href="#Issues-fixed-after-release-20201207">Issues fixed after release 20201207</a></li>
<li><a href="#Open-Issues">Open Issues</a></li>
</ul>
+<h1 id="Issues-fixed-after-release-20210625">Issues fixed after release 20210625</h1>
+
+<dl>
+
+<dt id="Fix-problem-with-side-comment-after-pattern"><b>Fix problem with side comment after pattern</b></dt>
+<dd>
+
+<p>Testing with randomly placed side comments produced an error illustrated with the following snippet:</p>
+
+<pre><code> testit
+ /A (*THEN) X | B (*THEN) C/x#sc#
+ ,
+ "Simple (*THEN) test"
+ ;</code></pre>
+
+<p>If 'testit' is an unknown bareword then perltidy has to guess if the '/' is a division or can start a pattern. In this case the side comment caused a bad guess. This is case c044 and is fixed with this update. There are no other known issues with side comments at the present time but testing continues.</p>
+
+<p>13 Jul 2021, 8b36de8.</p>
+
+</dd>
+<dt id="Fix-problem-with-side-comment-after-pointer-part-3"><b>Fix problem with side comment after pointer, part 3</b></dt>
+<dd>
+
+<p>This update fixes some incorrect tokenization produced by a side comment placed between a pointer and a bareword as in this snippet:</p>
+
+<pre><code> sub tzoffset {};
+
+ ...
+
+ my $J
+ +=
+ (
+ $self
+ ->#sc
+ tzoffset
+ / (
+ 24
+ *
+ 3600
+ )
+ );</code></pre>
+
+<p>If a sub declaration for the bareword has been seen, the following '/' was being rejected as an operator. This update fixes this case, which is issue c043.</p>
+
+<p>13 Jul 2021, cab7ed3.</p>
+
+</dd>
+<dt id="Avoid-line-breaks-before-a-slash-in-certain-cases"><b>Avoid line breaks before a slash in certain cases</b></dt>
+<dd>
+
+<p>This is a modification to the previous update for case c039 which prevents a line break before a '/' character which follows a bareword or possible indirect object. This rule will be only be used to prevent creating new line breaks. Existing line breaks can remain.</p>
+
+<p>11 Jul 2021, 7afee47.</p>
+
+</dd>
+<dt id="Fix-error-parsing-sub-attributes-with-side-comment"><b>Fix error parsing sub attributes with side comment</b></dt>
+<dd>
+
+<p>Testing with side comments produced an error in the following snippet:</p>
+
+<pre><code> sub plugh () :#
+ Ugly('\(") : Bad;</code></pre>
+
+<p>This is fixed in this update, case c038.</p>
+
+<p>11 Jul 2021, 80f2a3a.</p>
+
+</dd>
+<dt id="Fix-case-b1172-a-failure-to-converge"><b>Fix case b1172, a failure to converge</b></dt>
+<dd>
+
+<p>Random testing produced case b1172, a failure to converge with unusual parametrs. This update fixes this case. There are no other known cases of instability at the present time but testing continues.</p>
+
+<p>10 Jul 2021, 47e7f9b.</p>
+
+</dd>
+<dt id="Avoid-line-breaks-before-a-slash-in-certain-cases1"><b>Avoid line breaks before a slash in certain cases</b></dt>
+<dd>
+
+<p>This update prevents a line break before a '/' character which follows a bareword or possible indirect object. The purpose is reduce the chance of introducing a syntax error in cases where perl is using spaces to distinguish between a division and the start of a pattern.</p>
+
+<p>This fixes case c039.</p>
+
+<p>10 Jul 2021, 461199c.</p>
+
+</dd>
+<dt id="Removed-warning-message-if-ending-in-code-skipping-section"><b>Removed warning message if ending in code skipping section</b></dt>
+<dd>
+
+<p>In the previous version, a warning was produced if a 'code-skipping' opening comment '#<<V' was not followed by a closing comment '#>>V'. But the related 'format-skipping' commands do not give a warning if a '#<<<' comment is not ended with a '#>>>' closing comment. In order to be able to smoothly change between these options, it seems best to remove the warning about a missing '#>>V'. There is still a message in the log file about this, so if there is any uncertainty about it, a log file can be saved and consulted.</p>
+
+<p>10 Jul 2021, 461199c.</p>
+
+</dd>
+<dt id="Improve-logic-for-distinguishing-a-pattern-vs-a-division"><b>Improve logic for distinguishing a pattern vs a division</b></dt>
+<dd>
+
+<p>Testing with side comments produced the following snippet which caused a error due to the side comment on the '/'</p>
+
+<pre><code> $bond_str
+ =
+ VERY_WEAK #sc#
+ / #sc#
+ 1.05
+ ;</code></pre>
+
+<p>Several related examples were found in which side comments triggered errors. For example</p>
+
+<pre><code> ok
+ /[^\s]+/#sc#
+ ,
+ 'm/[^\s]/ utf8'
+ ;</code></pre>
+
+<p>This update fixes these problems, case c040.</p>
+
+<p>9 Jul 2021, ffe4351.</p>
+
+</dd>
+<dt id="Fix-problem-caused-by-side-comment-after"><b>Fix problem caused by side comment after ++</b></dt>
+<dd>
+
+<p>Testing with side comments produced an incorrect error message for this snippet:</p>
+
+<pre><code> xxx
+ ++#
+ $test,
+ Internals::SvREADONLY( %$copy) ,
+ "cloned hash restricted?" ;</code></pre>
+
+<p>The problem was caused by the side comment between the '++' and '$test'. The same problem occurs for '--' instead of '++'. This is fixed with this update, case c042.</p>
+
+<p>8 Jul 2021, 20cc9a0.</p>
+
+</dd>
+<dt id="Fix-problem-caused-by-side-comment-after-pointer-part-2"><b>Fix problem caused by side comment after pointer, part 2</b></dt>
+<dd>
+
+<p>This is related to the previous issue, c037. The following snippet was misparsed at the old style ' package separater due to the side comment following the pointer.</p>
+
+<pre><code> @ret
+ =
+ $o
+ ->#
+ SUPER'method
+ (
+ 'whatever'
+ )
+ ;</code></pre>
+
+<p>This is fixed in this update, case c041.</p>
+
+<p>7 Jul 2021, 1806772.</p>
+
+</dd>
+<dt id="Fix-problem-caused-by-side-comment-after-pointer"><b>Fix problem caused by side comment after pointer</b></dt>
+<dd>
+
+<p>The following test script</p>
+
+<pre><code> is(
+ $one
+ ->#sc#
+ package
+ ,
+ "bar"
+ ,
+ "Got package"
+ )
+ ;</code></pre>
+
+<p>Caused the following error message:</p>
+
+<pre><code> 4: package
+ ^
+ found package where operator expected</code></pre>
+
+<p>The problem was caused by a side comment between the pointer '->' and the word 'package'. This caused package to be misparsed as a keyword, causing the error.</p>
+
+<p>This is fixed in this update, case c037, 96f2ebb.</p>
+
+</dd>
+<dt id="Fix-error-parsing-and-similar-combinations"><b>Fix error parsing '%#' and similar combinations</b></dt>
+<dd>
+
+<p>Perltidy was correctly distinguishing between '$#' and '$ #' but not between '@#' and '@ #' and '%#' and '% #'. The coding for parsing these types of expressions has been corrected. Some simple examples:</p>
+
+<pre><code> # this is a valid program, '%#' is a punctuation variable
+ %# = ( foo => 'bar', baz => 'buz' );
+ print keys(%#), "\n";
+
+ # but this is a syntax error (space before # makes a side comment)
+ # (perltidy was ignoring the space and forming '%#' here)
+ % # = ( foo => 'bar', baz => 'buz' );
+ print keys(%#), "\n";
+
+ # this is a valid program, '@#' is a punctuation variable
+ @# = ( foo , 'bar', baz , 'buz' );
+ print @#, "\n";
+
+ # this is a valid program, the space makes the '#' a side comment
+ # perltidy formed %# here, causing an error
+ % #
+ var = ( foo => 'bar', baz => 'buz' );
+ print keys(%var), "\n";</code></pre>
+
+<p>This fixes case c036.</p>
+
+<p>6 Jul 2021, e233d41.</p>
+
+</dd>
+<dt id="Fix-error-parsing"><b>Fix error parsing '&#'</b></dt>
+<dd>
+
+<p>The following test script caused an error when perltidy did not correctly parse the tight side comment after the '&' (it parsed correctly if there was a space before the '#').</p>
+
+<pre><code> print$my_bag
+ &#sc#
+ $your_bag
+ ,
+ "\n"
+ ;</code></pre>
+
+<p>This update fixes this issue, c033.</p>
+
+<p>5 Jul 2021, 0d784e0.</p>
+
+</dd>
+<dt id="Fix-error-parsing-format-statement"><b>Fix error parsing format statement</b></dt>
+<dd>
+
+<p>The following test script caused an error when perltidy took 'format' to start a format statement.</p>
+
+<pre><code> my$ascii#sc#
+ =#sc#
+ $formatter#sc#
+ ->#sc#
+ format#sc#
+ (#sc#
+ $html#sc#
+ )#sc#
+ ;#sc#</code></pre>
+
+<p>This was fixed by requiring a format statement to begin where a new statement can occur. This fixes issue c035.</p>
+
+<p>5 Jan 2021, 2ef16fb.</p>
+
+</dd>
+<dt id="Fix-some-incorrect-error-messages-due-to-side-comments"><b>Fix some incorrect error messages due to side comments</b></dt>
+<dd>
+
+<p>Testing with large numbers of side comments caused perltidy to produce some incorrect error messages. Two issues are fixed with this update. First, a side comment between a pointer '->' and the next identifier caused a message. Second, in some cases a comment after an opening paren could cause a message. The following snippet is an example.</p>
+
+<pre><code> $Msg#sc#
+ ->#sc#
+ $field#sc#
+ (#sc#
+ )#sc#
+ ;#sc#</code></pre>
+
+<p>This update fixes cases c029 and c030.</p>
+
+<p>4 Jul 2021, caffc2c.</p>
+
+</dd>
+<dt id="Fix-undefined-var-ref-involving---format-skipping"><b>Fix undefined var ref involving --format-skipping</b></dt>
+<dd>
+
+<p>Testing produced a situation in which version 20200625 could cause an undefined variable to be accessed (the variable 'Ktoken_vars') as in this snippet:</p>
+
+<pre><code> #!/usr/bin/perl
+ #<<<
+ my $ra= (
+ [ 'Shine', 40 ], [ 'Specular', [ 1, 1, 0.3, 0 ] ] );
+ #<<<
+ ...</code></pre>
+
+<p>The conditions for this to happen are:</p>
+
+<pre><code> (1) format skipping (#<<<) begins before the first line of code, and
+ (2) the format skipping section contains the two successive characters ', ['.</code></pre>
+
+<p>The undefined variable was 'Ktoken_vars'. This problem was introduced by commit 21ef53b, an update which fixed case b1100. This undefined variable access does influence the formatted output.</p>
+
+<p>This update fixes this problem.</p>
+
+<p>4 Jul 2021, 82916fe.</p>
+
+</dd>
+<dt id="Check-for-side-comment-within-package-statement"><b>Check for side comment within package statement</b></dt>
+<dd>
+
+<p>Testing with randomly placed side comments caused perltidy to produce an incorrect warning when a side comment is placed before the end of a package statement:</p>
+
+<pre><code> package double # side comment
+ ;</code></pre>
+
+<p>This update fixes this. 3 Jul 2021, c00059a.</p>
+
+</dd>
+<dt id="Fix-problem-with--comma-arrow-breakpoint-n-flag"><b>Fix problem with -comma-arrow-breakpoint=n flag</b></dt>
+<dd>
+
+<p>Testing revealed a formatting irregularity which was caused when the flag -cab=2 got applied to a container which was not a list. This is fixed with update, which fixes case b939a.</p>
+
+<p>1 Jul 2021, 021b938.</p>
+
+</dd>
+<dt id="Fix-a-formatting-instability"><b>Fix a formatting instability</b></dt>
+<dd>
+
+<p>Testing showed that a previously fixed case of instability, b1144, which was fixed 21 Jun 2021, 1b682fd, was unstable again. This update is a small change which fixes this. There are no other known unstable cases at this time but automated testing runs continue to search for instabilities.</p>
+
+<p>1 Jul 2021, 021b938.</p>
+
+</dd>
+<dt id="Fixed-use-of-uninitialized-value"><b>Fixed use of uninitialized value</b></dt>
+<dd>
+
+<p>The previous Tokenizer update caused the use of an unitialized value when run on case b1053:</p>
+
+<pre><code> Use of uninitialized value $next_nonblank_token in pattern match (m//) at /home/steve/bin/Perl/Tidy/Tokenizer.pm line 7589.
+ Use of uninitialized value $nn_nonblank_token in pattern match (m//) at /home/steve/bin/Perl/Tidy/Tokenizer.pm line 3723.
+ b1053 converged on iteration 2</code></pre>
+
+<p>This update fixes this.</p>
+
+<p>1 Jul 2021, ea139bd.</p>
+
+</dd>
+<dt id="Fix-token-type-of-colon-introducing-anonomyous-sub-attribute-list"><b>Fix token type of colon introducing anonomyous sub attribute list</b></dt>
+<dd>
+
+<p>In the following example</p>
+
+<pre><code> print "not " unless ref +(
+ map {
+ sub : lvalue { "a" }
+ } 1
+ )[0] eq "CODE";</code></pre>
+
+<p>the colon after 'sub' was being marked as part of a label rather than the start of an attribute list. This does not cause an error, but the space before the ':' is lost. This is fixed in this update.</p>
+
+<p>Note that something like 'sub :' can also be a label, so the tokenizer has to look ahead to decide what to do. For example, this 'sub :' is a label:</p>
+
+<pre><code> my $xx = 0;
+ sub : {
+ $xx++;
+ print "looping with label sub:, a=$xx\n";
+ if ( $xx < 10 ) { goto "sub" }
+ }</code></pre>
+
+<p>In this case, the goto statement needs quotes around "sub" because it is a keyword.</p>
+
+<p>29 Jun 2021, d5fb3d5.</p>
+
+</dd>
+<dt id="Minor-adjustments-to-improve-formatting-stability"><b>Minor adjustments to improve formatting stability</b></dt>
+<dd>
+
+<p>Testing with random input parameters produced several new cases of formatting instability involving unusual parameter combinations. This update fixes these cases, b1169 b1170 b1171, and all previously discovered cases remain stable with the update.</p>
+
+<p>28 Jun 2021, e1f22e0.</p>
+
+</dd>
+<dt id="Remove-limit-on--ci-n-when--xci-is-set-see-rt-136415"><b>Remove limit on -ci=n when -xci is set, see rt #136415</b></dt>
+<dd>
+
+<p>This update undoes the update c16c5ee of 20 Feb 2021, in which the value of -ci=n was limited to the value of -i=n when -xci was set. Recent improvements in stability tolerances allow this limit to be removed.</p>
+
+<p>28 Jun 2021, 1b3c5e9.</p>
+
+</dd>
+<dt id="Minor-optimization"><b>Minor optimization</b></dt>
+<dd>
+
+<p>Added a quick check to bypass a needless sub call.</p>
+
+<p>26 Jan 2021, e7822df.</p>
+
+</dd>
+<dt id="Eliminate-token-variable-_LEVEL_TRUE_"><b>Eliminate token variable _LEVEL_TRUE_</b></dt>
+<dd>
+
+<p>It was possible to eliminate this token variable by changing the order of welding operations. This reduces the number of variables per token from 12 to 11.</p>
+
+<p>26 Jun 2021, 1f4f78c.</p>
+
+</dd>
+<dt id="Eliminate-token-variable-_CONTAINER_ENVIRONMENT_"><b>Eliminate token variable _CONTAINER_ENVIRONMENT_</b></dt>
+<dd>
+
+<p>Testing with NYT_Prof shows that the number of variables per token has a direct effect on efficiency. This update reduces the number of token variables from 13 to 12, and also simplifies the coding. It was possible to compute this variable from the others, so it was redundant.</p>
+
+<p>26 Jun 2021, 300ca1e.</p>
+
+</dd>
+</dl>
+
<h1 id="Issues-fixed-after-release-20210402">Issues fixed after release 20210402</h1>
<dl>
+<dt id="Release-20210625"><b>Release 20210625</b></dt>
+<dd>
+
+<p>24 Jun 2021, a4ff53d.</p>
+
+</dd>
<dt id="Adjust-tolerances-to-fix-some-unstable-edge-cases"><b>Adjust tolerances to fix some unstable edge cases</b></dt>
<dd>
<p>There are no other known cases of formatting instability at the present time, but testing with random input parameters will continue.</p>
-<p>21 Jun 2021.</p>
+<p>21 Jun 2021, 1b682fd.</p>
</dd>
<dt id="Adjust-tolerances-to-fix-some-unstable-edge-cases1"><b>Adjust tolerances to fix some unstable edge cases</b></dt>
<p>This fixes cases b1125 b1126 b1127.</p>
-<p>2 May 2021i, dac97cb.</p>
+<p>2 May 2021, dac97cb.</p>
</dd>
<dt id="Avoid-instability-of-combination--bbx-2--lp-and--xci"><b>Avoid instability of combination -bbx=2 -lp and -xci</b></dt>
<h1>Perltidy Change Log</h1>
+<h2>2021 07 17</h2>
+
+<pre><code>- This release is being made mainly because of the next item, in which an
+ error message about an uninitialized value error message could be produced
+ in certain cases when format-skipping is used. The error message was
+ annoying but harmless to formatting. This version may produce occasional
+ differences in formatting compared to previous versions, mainly for lines
+ which are near the specified line length limit. This is due to ongoing
+ efforts to eliminate edge cases of formatting instability.
+
+- Fixed an undefined variable message, see git #67. When a format skipping
+ comment '#<<' is placed before the first line of code in a script, a
+ message 'Use of uninitialized value $Ktoken_vars in numeric ...' can
+ occur.
+
+- A warning will no longer be given if a script has an opening code-skipping
+ comment '#<<V' which is not terminated with a closing comment '#>>V'. This
+ makes code-skipping and format-skipping behave in a similar way: a
+ '#>>V' or '#>>>' comment without a corresponding closing comment will cause
+ the rest of a file to be skipped. If there is a question about which lines
+ are skipped, a .LOG file can be produced with the -g flag and it will have
+ this information.
+
+- Removed the limit on -ci=n when -xci is set, reference: rt #136415.
+ This update removes a limit in the previous two versions in which the
+ value of -ci=n was limited to the value of -i=n when -xci was set.
+ This limit had been placed to avoid some formatting instabilities,
+ but recent coding improvements allow the limit to be removed.
+
+- Numerous minor fixes have been made. A complete list is at:
+
+ https://github.com/perltidy/perltidy/blob/master/local-docs/BugLog.pod
+</code></pre>
+
<h2>2021 06 25</h2>
-<pre><code>- This release adds several new requested parameters. No significant bugs have
- been found since the last release, but a number of minor problems have been
+<pre><code>- This release adds several new requested parameters. No significant bugs have
+ been found since the last release, but a number of minor problems have been
corrected.
- Added a new option '--code-skipping', requested in git #65, in which code
between comment lines '#<<V' and '#>>V' is passed verbatim to the output
stream without error checking. It is simmilar to --format-skipping
- but there is no error checking of the skipped code. This can be useful for
+ but there is no error checking of the skipped code. This can be useful for
skipping past code which employs an extended syntax.
- Added a new option for closing paren placement, -vtc=3, requested in rt #136417.
- Added flag -atnl, --add-terminal-newline, to help issue git #58.
- This flag tells perltidy to terminate the last line of the output stream
- with a newline character, regardless of whether or not the input stream
+ This flag tells perltidy to terminate the last line of the output stream
+ with a newline character, regardless of whether or not the input stream
was terminated with a newline character. This is the default.
If this flag is negated, with -natnl, then perltidy will add a terminal
newline character to the the output stream only if the input
<h1 id="VERSION">VERSION</h1>
-<p>This man page documents Perl::Tidy version 20210625</p>
+<p>This man page documents Perl::Tidy version 20210717</p>
<h1 id="LICENSE">LICENSE</h1>
<h1 id="VERSION">VERSION</h1>
-<p>This man page documents perltidy version 20210625</p>
+<p>This man page documents perltidy version 20210717</p>
<h1 id="BUG-REPORTS">BUG REPORTS</h1>
# Release version must be bumped, and it is probably past time for a
# release anyway.
- $VERSION = '20210625.02';
+ $VERSION = '20210717';
}
sub DESTROY {
# look for a .perltidyrc configuration file
# For Windows also look for a file named perltidy.ini
my ( $is_Windows, $Windows_type, $rconfig_file_chatter,
- $rpending_complaint ) = @_;
+ $rpending_complaint )
+ = @_;
${$rconfig_file_chatter} .= "# Config file search...system reported as:";
if ($is_Windows) {
=head1 VERSION
-This man page documents Perl::Tidy version 20210625.02
+This man page documents Perl::Tidy version 20210717
=head1 LICENSE
package Perl::Tidy::Debugger;
use strict;
use warnings;
-our $VERSION = '20210625.02';
+our $VERSION = '20210717';
sub new {
package Perl::Tidy::DevNull;
use strict;
use warnings;
-our $VERSION = '20210625.02';
+our $VERSION = '20210717';
sub new { my $self = shift; return bless {}, $self }
sub print { return }
sub close { return }
package Perl::Tidy::Diagnostics;
use strict;
use warnings;
-our $VERSION = '20210625.02';
+our $VERSION = '20210717';
sub AUTOLOAD {
package Perl::Tidy::FileWriter;
use strict;
use warnings;
-our $VERSION = '20210625.02';
+our $VERSION = '20210717';
use constant DEVEL_MODE => 0;
{ #<<< A non-indenting brace to contain all lexical variables
use Carp;
-our $VERSION = '20210625.02';
+our $VERSION = '20210717';
# The Tokenizer will be loaded with the Formatter
##use Perl::Tidy::Tokenizer; # for is_keyword()
package Perl::Tidy::HtmlWriter;
use strict;
use warnings;
-our $VERSION = '20210625.02';
+our $VERSION = '20210717';
use File::Basename;
use strict;
use warnings;
use Carp;
-our $VERSION = '20210625.02';
+our $VERSION = '20210717';
sub AUTOLOAD {
use strict;
use warnings;
use Carp;
-our $VERSION = '20210625.02';
+our $VERSION = '20210717';
sub AUTOLOAD {
package Perl::Tidy::IndentationItem;
use strict;
use warnings;
-our $VERSION = '20210625.02';
+our $VERSION = '20210717';
BEGIN {
package Perl::Tidy::LineBuffer;
use strict;
use warnings;
-our $VERSION = '20210625.02';
+our $VERSION = '20210717';
sub AUTOLOAD {
package Perl::Tidy::LineSink;
use strict;
use warnings;
-our $VERSION = '20210625.02';
+our $VERSION = '20210717';
sub AUTOLOAD {
package Perl::Tidy::LineSource;
use strict;
use warnings;
-our $VERSION = '20210625.02';
+our $VERSION = '20210717';
sub AUTOLOAD {
package Perl::Tidy::Logger;
use strict;
use warnings;
-our $VERSION = '20210625.02';
+our $VERSION = '20210717';
sub AUTOLOAD {
package Perl::Tidy::Tokenizer;
use strict;
use warnings;
-our $VERSION = '20210625.02';
+our $VERSION = '20210717';
use Perl::Tidy::LineBuffer;
use Carp;
package Perl::Tidy::VerticalAligner;
use strict;
use warnings;
-our $VERSION = '20210625.02';
+our $VERSION = '20210717';
use Perl::Tidy::VerticalAligner::Alignment;
use Perl::Tidy::VerticalAligner::Line;
{ #<<< A non-indenting brace
-our $VERSION = '20210625.02';
+our $VERSION = '20210717';
# _column_ # the current column number
# _saved_column_ # a place for temporary storage
package Perl::Tidy::VerticalAligner::Line;
use strict;
use warnings;
-our $VERSION = '20210625.02';
+our $VERSION = '20210717';
BEGIN {
my $i = 0;
There are no other known issues with side comments at the present time
but testing continues.
-13 Jul 2021.
-
+13 Jul 2021, 8b36de8.
=item B<Fix problem with side comment after pointer, part 3>
being rejected as an operator. This update fixes this case, which is issue
c043.
-13 Jul 2021.
+13 Jul 2021, cab7ed3.
=item B<Avoid line breaks before a slash in certain cases>
This is a modification to the previous update for case c039 which prevents a line break before a '/' character which follows a bareword or possible indirect object. This rule
will be only be used to prevent creating new line breaks. Existing line breaks can remain.
-11 Jul 2021
+11 Jul 2021, 7afee47.
=item B<Fix error parsing sub attributes with side comment>
This is fixed in this update, case c038.
-11 Jul 2021.
+11 Jul 2021, 80f2a3a.
=item B<Fix case b1172, a failure to converge>
This update fixes this case. There are no other known cases of instability
at the present time but testing continues.
-10 Jul 2021.
+10 Jul 2021, 47e7f9b.
=item B<Avoid line breaks before a slash in certain cases>
This fixes case c039.
-10 Jul 2021
+10 Jul 2021, 461199c.
=item B<Removed warning message if ending in code skipping section>
to remove the warning about a missing '#>>V'. There is still a message in the log file
about this, so if there is any uncertainty about it, a log file can be saved and consulted.
-10 Jul 2021.
+10 Jul 2021, 461199c.
=item B<Improve logic for distinguishing a pattern vs a division>
In the unlikely event that a user enters a filename more than once on the
command line to perltidy, as for 'file1.pl' here
-
+
perltidy file1.pl file1.pl
then that file will be processed more than once. This looks harmless, but if
=item B<terminal braces not indenting correctly with -bli formatting, issue git #40>
This problem is illustrated with the following snippet when run with -bli -blil='*'
-
+
#-bli -bli list='*'
try
{
=item B<Do not create a zero size file by deleting semicolons>
A rule was added to prevent a file consisting of a single semicolon
-
+
;
from becoming a zero length file. This could cause problems with other
- Review code, especially any ## commented out sections and "FIXME's"
- run perlver on all modules to check minimum version; should be 5.8.0
- The first line in Tidy.pm has the required version of Perl
- - travis-CI is setup to test on version 5.8 so we should catch this type of error automatically
- use perlbrew to do local checks and debugging on earlier versions of perl if desired
- Run tidyall -a to be sure code is tidied
- note that I have tidyall set to also run perlcritic right now
use the B<-ss>, or B<--stylesheet>, flag. This is useful if the style
sheet could not be written for some reason, such as if the B<-pre> flag
was used. Thus, for example,
-
+
perltidy -html -ss >mystyle.css
will write a style sheet with the default properties to file
programs with B<-w> occasionally, especially if your are looking for a
bug. For example, it will ask if you really want '=' instead of '=~' in
this line:
-
+
$line = s/^\s*//;
This kind of error can otherwise be hard to find.