]> git.donarmstrong.com Git - perltidy.git/commitdiff
updating to Version 20210717
authorSteve Hancock <perltidy@users.sourceforge.net>
Thu, 15 Jul 2021 14:23:48 +0000 (07:23 -0700)
committerSteve Hancock <perltidy@users.sourceforge.net>
Thu, 15 Jul 2021 14:23:48 +0000 (07:23 -0700)
29 files changed:
CHANGES.md
bin/perltidy
docs/BugLog.html
docs/ChangeLog.html
docs/Tidy.html
docs/perltidy.html
lib/Perl/Tidy.pm
lib/Perl/Tidy.pod
lib/Perl/Tidy/Debugger.pm
lib/Perl/Tidy/DevNull.pm
lib/Perl/Tidy/Diagnostics.pm
lib/Perl/Tidy/FileWriter.pm
lib/Perl/Tidy/Formatter.pm
lib/Perl/Tidy/HtmlWriter.pm
lib/Perl/Tidy/IOScalar.pm
lib/Perl/Tidy/IOScalarArray.pm
lib/Perl/Tidy/IndentationItem.pm
lib/Perl/Tidy/LineBuffer.pm
lib/Perl/Tidy/LineSink.pm
lib/Perl/Tidy/LineSource.pm
lib/Perl/Tidy/Logger.pm
lib/Perl/Tidy/Tokenizer.pm
lib/Perl/Tidy/VerticalAligner.pm
lib/Perl/Tidy/VerticalAligner/Alignment.pm
lib/Perl/Tidy/VerticalAligner/Line.pm
local-docs/BugLog.pod
local-docs/Release-Checklist.md
local-docs/perl2web.pod
local-docs/tutorial.pod

index da6b8dc7dfdb07971c6887139fc82d14bd4222b3..45d6a1fb158fae9ab969778db22e1b1150031087 100644 (file)
@@ -1,15 +1,27 @@
 # 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
index f93f0daa6964b1589baa8877faebbf58e14d8e28..34c6b5103ccc58d3a4dc2ae2114337408a646b5f 100755 (executable)
@@ -221,7 +221,7 @@ The path should end in a valid path separator character, but perltidy will try
 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
@@ -608,7 +608,7 @@ or
    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
@@ -898,7 +898,7 @@ a C<)>, C<]>, or a non-block C<}>.  Such a line receives:
 
 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',
@@ -993,7 +993,7 @@ a'\s', so you must also include backslashes for characters to be taken
 literally rather than as patterns.
 
 For example, to match the side comment '#++', the parameter would be
-  
+
   -nibp='#\+\+'
 
 
@@ -1246,7 +1246,7 @@ The various parameters controlling whitespace within a program are requests whic
    }
 
 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;
@@ -2178,7 +2178,7 @@ this parameter.  This parameter is a character string, giving a list of
 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
@@ -3224,7 +3224,7 @@ treated specially.  In this case, an item such as "01" => 31 is
 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,
@@ -3352,7 +3352,7 @@ form longer lines, use B<-nbot>.
 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)
@@ -4308,7 +4308,7 @@ large data file. Most perl scripts are less than about 2 MB in size. The
 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. 
@@ -4499,7 +4499,7 @@ To cause perltidy to write a style sheet to standard output and exit,
 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
@@ -4776,7 +4776,7 @@ The perltidy binary uses the Perl::Tidy module and is installed when that module
 
 =head1 VERSION
 
-This man page documents perltidy version 20210625.02
+This man page documents perltidy version 20210717
 
 =head1 BUG REPORTS
 
index a770e72decad40511078b940464a7425c444e6cc..c382cffa04d5b04b5c99bce6298b42ae9bc65482 100644 (file)
@@ -12,6 +12,7 @@
 
 
 <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#
+    ,
+    &quot;Simple (*THEN) test&quot;
+    ;</code></pre>
+
+<p>If &#39;testit&#39; is an unknown bareword then perltidy has to guess if the &#39;/&#39; 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
+    -&gt;#sc
+    tzoffset
+    / (
+    24
+    *
+    3600
+    )
+    );</code></pre>
+
+<p>If a sub declaration for the bareword has been seen, the following &#39;/&#39; 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 &#39;/&#39; 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(&#39;\(&quot;) : 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 &#39;/&#39; 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 &#39;code-skipping&#39; opening comment &#39;#&lt;&lt;V&#39; was not followed by a closing comment &#39;#&gt;&gt;V&#39;. But the related &#39;format-skipping&#39; commands do not give a warning if a &#39;#&lt;&lt;&lt;&#39; comment is not ended with a &#39;#&gt;&gt;&gt;&#39; closing comment. In order to be able to smoothly change between these options, it seems best to remove the warning about a missing &#39;#&gt;&gt;V&#39;. 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 &#39;/&#39;</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#
+    ,
+    &#39;m/[^\s]/ utf8&#39;
+    ;</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) , 
+    &quot;cloned hash restricted?&quot; ;</code></pre>
+
+<p>The problem was caused by the side comment between the &#39;++&#39; and &#39;$test&#39;. The same problem occurs for &#39;--&#39; instead of &#39;++&#39;. 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 &#39; package separater due to the side comment following the pointer.</p>
+
+<pre><code>    @ret
+    =
+    $o
+    -&gt;#
+    SUPER&#39;method
+    (
+    &#39;whatever&#39;
+    )
+    ;</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
+    -&gt;#sc#
+    package
+    ,
+    &quot;bar&quot;
+    ,
+    &quot;Got package&quot;
+    )
+    ;</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 &#39;-&gt;&#39; and the word &#39;package&#39;. 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 &#39;%#&#39; and similar combinations</b></dt>
+<dd>
+
+<p>Perltidy was correctly distinguishing between &#39;$#&#39; and &#39;$ #&#39; but not between &#39;@#&#39; and &#39;@ #&#39; and &#39;%#&#39; and &#39;% #&#39;. The coding for parsing these types of expressions has been corrected. Some simple examples:</p>
+
+<pre><code>    # this is a valid program, &#39;%#&#39; is a punctuation variable
+    %# = ( foo =&gt; &#39;bar&#39;, baz =&gt; &#39;buz&#39; );
+    print keys(%#), &quot;\n&quot;;
+
+    # but this is a syntax error (space before # makes a side comment)
+    # (perltidy was ignoring the space and forming &#39;%#&#39; here)
+    % # = ( foo =&gt; &#39;bar&#39;, baz =&gt; &#39;buz&#39; );
+    print keys(%#), &quot;\n&quot;;
+
+    # this is a valid program, &#39;@#&#39; is a punctuation variable
+    @# = ( foo , &#39;bar&#39;, baz , &#39;buz&#39; );
+    print @#, &quot;\n&quot;;
+
+    # this is a valid program, the space makes the &#39;#&#39; a side comment
+    # perltidy formed %# here, causing an error
+    % #
+    var = ( foo =&gt; &#39;bar&#39;, baz =&gt; &#39;buz&#39; );
+    print keys(%var), &quot;\n&quot;;</code></pre>
+
+<p>This fixes case c036.</p>
+
+<p>6 Jul 2021, e233d41.</p>
+
+</dd>
+<dt id="Fix-error-parsing"><b>Fix error parsing &#39;&amp;#&#39;</b></dt>
+<dd>
+
+<p>The following test script caused an error when perltidy did not correctly parse the tight side comment after the &#39;&amp;&#39; (it parsed correctly if there was a space before the &#39;#&#39;).</p>
+
+<pre><code>    print$my_bag
+    &amp;#sc#
+    $your_bag
+    ,
+    &quot;\n&quot;
+    ;</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 &#39;format&#39; to start a format statement.</p>
+
+<pre><code>    my$ascii#sc#
+    =#sc#
+    $formatter#sc#
+    -&gt;#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 &#39;-&gt;&#39; 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#
+    -&gt;#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 &#39;Ktoken_vars&#39;) as in this snippet:</p>
+
+<pre><code>    #!/usr/bin/perl
+    #&lt;&lt;&lt;
+        my $ra= (
+            [ &#39;Shine&#39;, 40 ], [ &#39;Specular&#39;, [ 1, 1, 0.3, 0 ] ] );
+    #&lt;&lt;&lt;
+    ...</code></pre>
+
+<p>The conditions for this to happen are:</p>
+
+<pre><code>  (1) format skipping (#&lt;&lt;&lt;) begins before the first line of code, and
+  (2) the format skipping section contains the two successive characters &#39;, [&#39;.</code></pre>
+
+<p>The undefined variable was &#39;Ktoken_vars&#39;. 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 &quot;not &quot; unless ref +(
+        map {
+            sub : lvalue { &quot;a&quot; }
+        } 1
+    )[0] eq &quot;CODE&quot;;</code></pre>
+
+<p>the colon after &#39;sub&#39; 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 &#39;:&#39; is lost. This is fixed in this update.</p>
+
+<p>Note that something like &#39;sub :&#39; can also be a label, so the tokenizer has to look ahead to decide what to do. For example, this &#39;sub :&#39; is a label:</p>
+
+<pre><code>    my $xx = 0;
+    sub : {
+        $xx++;
+        print &quot;looping with label sub:, a=$xx\n&quot;;
+        if ( $xx &lt; 10 ) { goto &quot;sub&quot; }
+    }</code></pre>
+
+<p>In this case, the goto statement needs quotes around &quot;sub&quot; 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>
index 9e27ae07fbd5aa756b53ca8cec8f47bfa3e50e9b..5da04d461d82b0df3836f19e83bf182c010b0e8b 100644 (file)
@@ -1,22 +1,56 @@
 <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 '#&lt;&lt;' 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 '#&lt;&lt;V' which is not terminated with a closing comment '#&gt;&gt;V'. This
+  makes code-skipping and format-skipping behave in a similar way: a
+  '#&gt;&gt;V' or '#&gt;&gt;&gt;' 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 '#&lt;&lt;V' and '#&gt;&gt;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
index 50966cfe8b51d2d02a3af52d50af3d4172de065e..7f1f7fc162e9054e89d42cd9e257451fb5b9eb69 100644 (file)
 
 <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>
 
index 107db3f2d1b0f52cfa2c2b4021496da8f7ed26f2..ec997a403b870b572e6ccc8322ebcf0db3628db4 100644 (file)
 
 <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>
 
index 40ffb1695b62d651ff1eb8082c30f605cc2d52c8..ffeb8b80c2cde56bc19b01249146f9b32ce1b3c7 100644 (file)
@@ -110,7 +110,7 @@ BEGIN {
     # Release version must be bumped, and it is probably past time for a
     # release anyway.
 
-    $VERSION = '20210625.02';
+    $VERSION = '20210717';
 }
 
 sub DESTROY {
@@ -3696,7 +3696,8 @@ sub find_config_file {
     # 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) {
index 49fd2a09c311961ef6ebc22d4d6615ae8924bfa3..138b336e7fea92195d6af2f45c055ca30e125060 100644 (file)
@@ -432,7 +432,7 @@ The module 'Perl::Tidy' comes with a binary 'perltidy' which is installed when t
 
 =head1 VERSION
 
-This man page documents Perl::Tidy version 20210625.02
+This man page documents Perl::Tidy version 20210717
 
 =head1 LICENSE
 
index 350ec98beb7b9a0f21967dd6d5890d08043db147..8eeb2d1ce8162c75b860af5e44a99666bf08975c 100644 (file)
@@ -7,7 +7,7 @@
 package Perl::Tidy::Debugger;
 use strict;
 use warnings;
-our $VERSION = '20210625.02';
+our $VERSION = '20210717';
 
 sub new {
 
index d5832f123243aeb9ebd34da0160cd0b33dd6e048..2b703ee7e2c4f15fe96751f8d38027d2b44c90e5 100644 (file)
@@ -7,7 +7,7 @@
 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 }
index b0e1934c6a30408967627ac0c0cff73d7855e0b3..c74ab9acd5b7d5fc0eaa301e7ceae8d6b4a228a4 100644 (file)
@@ -20,7 +20,7 @@
 package Perl::Tidy::Diagnostics;
 use strict;
 use warnings;
-our $VERSION = '20210625.02';
+our $VERSION = '20210717';
 
 sub AUTOLOAD {
 
index ac6cd6ed89a7bb296eb23ed09bccfbf7fbdd5e83..9a9d62f20a7517f8333c3eed95872323c1923f41 100644 (file)
@@ -7,7 +7,7 @@
 package Perl::Tidy::FileWriter;
 use strict;
 use warnings;
-our $VERSION = '20210625.02';
+our $VERSION = '20210717';
 
 use constant DEVEL_MODE => 0;
 
index a24492de3497433a3ec81481dac9a015e3d51b71..a83e1c436fdd55717600caea6909ad6cbb40e75a 100644 (file)
@@ -49,7 +49,7 @@ 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()
index b9299a8bcf55f68e60462ec89ab8e2630623dc4c..8c11ee5afba7c6a6078d19a1395d9216f5caa0c5 100644 (file)
@@ -7,7 +7,7 @@
 package Perl::Tidy::HtmlWriter;
 use strict;
 use warnings;
-our $VERSION = '20210625.02';
+our $VERSION = '20210717';
 
 use File::Basename;
 
index a14e5bda8b545a540836aad4737feb5700ed1bd5..1a96c54ae6c2ef1f8c919cffc1b1ca7c3e9ea9b6 100644 (file)
@@ -10,7 +10,7 @@ package Perl::Tidy::IOScalar;
 use strict;
 use warnings;
 use Carp;
-our $VERSION = '20210625.02';
+our $VERSION = '20210717';
 
 sub AUTOLOAD {
 
index f185a573a5534adb87474a568081995fd0312097..640459b85134fc83445297c702886bc608591ef5 100644 (file)
@@ -14,7 +14,7 @@ package Perl::Tidy::IOScalarArray;
 use strict;
 use warnings;
 use Carp;
-our $VERSION = '20210625.02';
+our $VERSION = '20210717';
 
 sub AUTOLOAD {
 
index ea59c5ad0821bc534a017727fa826f157f12826a..14e00719a8940124d65cc1355d4f3e5b9d338e39 100644 (file)
@@ -8,7 +8,7 @@
 package Perl::Tidy::IndentationItem;
 use strict;
 use warnings;
-our $VERSION = '20210625.02';
+our $VERSION = '20210717';
 
 BEGIN {
 
index d695102d7c33f187b02f0a2ffd96bbf48ffff827..d77a84120c7cb5758a8586de6978ffe8fdf77bdf 100644 (file)
@@ -12,7 +12,7 @@
 package Perl::Tidy::LineBuffer;
 use strict;
 use warnings;
-our $VERSION = '20210625.02';
+our $VERSION = '20210717';
 
 sub AUTOLOAD {
 
index 2cabaebc5744fc5f3e4b2a1daa4769a14263ec85..a3cee83ed3c2bb3bef812aec25f2734be1bac268 100644 (file)
@@ -8,7 +8,7 @@
 package Perl::Tidy::LineSink;
 use strict;
 use warnings;
-our $VERSION = '20210625.02';
+our $VERSION = '20210717';
 
 sub AUTOLOAD {
 
index bd95f0e7787b5a0ad680a0e77a090171c97eefb9..f4798ca9547b13110ac91fd36d16fc7a9467cd0d 100644 (file)
@@ -8,7 +8,7 @@
 package Perl::Tidy::LineSource;
 use strict;
 use warnings;
-our $VERSION = '20210625.02';
+our $VERSION = '20210717';
 
 sub AUTOLOAD {
 
index 74214ad32e5b0c2829d66f518ce6b99126e7638f..14927e8ed57cd628adb9c4c1e092254686c77cbd 100644 (file)
@@ -7,7 +7,7 @@
 package Perl::Tidy::Logger;
 use strict;
 use warnings;
-our $VERSION = '20210625.02';
+our $VERSION = '20210717';
 
 sub AUTOLOAD {
 
index 0ced2cf2e5a2ac9a692bf9e8a8617ff9d45a31bd..c012e47f9d89b0a0c068a375f21c8ece343ced89 100644 (file)
@@ -21,7 +21,7 @@
 package Perl::Tidy::Tokenizer;
 use strict;
 use warnings;
-our $VERSION = '20210625.02';
+our $VERSION = '20210717';
 
 use Perl::Tidy::LineBuffer;
 use Carp;
index f77d47fe8f78546fa957c3e0531b447c0edc1805..7613ee29dfb55c04b94ff20b4ebb990a82093336 100644 (file)
@@ -1,7 +1,7 @@
 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;
index 6d34f664dd90a88733948783fe0957a7892ada87..79849c65de0cde8603b3320ab5708e716a372424 100644 (file)
@@ -10,7 +10,7 @@ use warnings;
 
 { #<<< A non-indenting brace
 
-our $VERSION = '20210625.02';
+our $VERSION = '20210717';
 
 #    _column_          # the current column number
 #    _saved_column_    # a place for temporary storage
index 5304248ad71de814f1df5bdbfa8d0e9298e07058..72f9512a686dd12cea86332b9ebc937914647087 100644 (file)
@@ -8,7 +8,7 @@
 package Perl::Tidy::VerticalAligner::Line;
 use strict;
 use warnings;
-our $VERSION = '20210625.02';
+our $VERSION = '20210717';
 
 BEGIN {
     my $i = 0;
index 536903be64cf8083c80b75bfcab58bae6551931b..4e79e066b0de4457ae29d4a521ac01af76819e6d 100644 (file)
@@ -19,8 +19,7 @@ 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.
 
-13 Jul 2021.
-
+13 Jul 2021, 8b36de8.
 
 =item B<Fix problem with side comment after pointer, part 3>
 
@@ -48,14 +47,14 @@ 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.
 
-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>
 
@@ -66,7 +65,7 @@ Testing with side comments produced an error in the following snippet:
 
 This is fixed in this update, case c038.
 
-11 Jul 2021.
+11 Jul 2021, 80f2a3a.
 
 =item B<Fix case b1172, a failure to converge>
 
@@ -74,7 +73,7 @@ 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.
 
-10 Jul 2021.
+10 Jul 2021, 47e7f9b.
 
 =item B<Avoid line breaks before a slash in certain cases>
 
@@ -82,7 +81,7 @@ This update prevents a line break before a '/' character which follows a barewor
 
 This fixes case c039.
 
-10 Jul 2021
+10 Jul 2021, 461199c.
 
 =item B<Removed warning message if ending in code skipping section>
 
@@ -93,7 +92,7 @@ comment.  In order to be able to smoothly change between these options, it seems
 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>
 
@@ -3516,7 +3515,7 @@ get made later in the iteration. Update made 9 Dec 2020, ca0ddf4.
 
 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
@@ -4052,7 +4051,7 @@ to avoid disturbing existing formatting.
 =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
       {
@@ -4188,7 +4187,7 @@ This was fixed 14 Sep 2020, included in 'Allow line-ending '=>' to align vertica
 =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
index 96e5eb0fceddda3534a98558933be0081e1782b0..c13eb6563cbaefc70a51e2f761613cff903c294a 100644 (file)
@@ -22,7 +22,6 @@
 - 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
index fbc60c6f0da1a91ae26f8fadac00ee98a445a9f2..c9798f7b8dbbae6cdad5a1a7671c6c841c7619d1 100644 (file)
@@ -117,7 +117,7 @@ To cause perltidy to write a style sheet to standard output and exit,
 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
index 76a87dc0002393d568927bc10a2f8b83427dc996..c5297a3b5761f52ecda2e6c8e72dc1f0065b376f 100644 (file)
@@ -390,7 +390,7 @@ The default is generally a good choice, but it's not a bad idea to check
 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.