From 98b5f8e4ac4e4e55ad3bebc486c45ebc7d3acd6d Mon Sep 17 00:00:00 2001 From: Steve Hancock Date: Thu, 15 Jul 2021 07:23:48 -0700 Subject: [PATCH] updating to Version 20210717 --- CHANGES.md | 22 +- bin/perltidy | 22 +- docs/BugLog.html | 410 ++++++++++++++++++++- docs/ChangeLog.html | 44 ++- docs/Tidy.html | 2 +- docs/perltidy.html | 2 +- lib/Perl/Tidy.pm | 5 +- lib/Perl/Tidy.pod | 2 +- lib/Perl/Tidy/Debugger.pm | 2 +- lib/Perl/Tidy/DevNull.pm | 2 +- lib/Perl/Tidy/Diagnostics.pm | 2 +- lib/Perl/Tidy/FileWriter.pm | 2 +- lib/Perl/Tidy/Formatter.pm | 2 +- lib/Perl/Tidy/HtmlWriter.pm | 2 +- lib/Perl/Tidy/IOScalar.pm | 2 +- lib/Perl/Tidy/IOScalarArray.pm | 2 +- lib/Perl/Tidy/IndentationItem.pm | 2 +- lib/Perl/Tidy/LineBuffer.pm | 2 +- lib/Perl/Tidy/LineSink.pm | 2 +- lib/Perl/Tidy/LineSource.pm | 2 +- lib/Perl/Tidy/Logger.pm | 2 +- lib/Perl/Tidy/Tokenizer.pm | 2 +- lib/Perl/Tidy/VerticalAligner.pm | 2 +- lib/Perl/Tidy/VerticalAligner/Alignment.pm | 2 +- lib/Perl/Tidy/VerticalAligner/Line.pm | 2 +- local-docs/BugLog.pod | 21 +- local-docs/Release-Checklist.md | 1 - local-docs/perl2web.pod | 2 +- local-docs/tutorial.pod | 2 +- 29 files changed, 512 insertions(+), 57 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index da6b8dc7..45d6a1fb 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -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'. 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 @@ -17,6 +29,10 @@ 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 diff --git a/bin/perltidy b/bin/perltidy index f93f0daa..34c6b510 100755 --- a/bin/perltidy +++ b/bin/perltidy @@ -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. Otherwise, F will @@ -608,7 +608,7 @@ or perltidy -guess file.pl To process a file in B 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 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 diff --git a/docs/BugLog.html b/docs/BugLog.html index a770e72d..c382cffa 100644 --- a/docs/BugLog.html +++ b/docs/BugLog.html @@ -12,6 +12,7 @@ +

Issues fixed after release 20210625

+ +
+ +
Fix problem with side comment after pattern
+
+ +

Testing with randomly placed side comments produced an error illustrated with the following snippet:

+ +
    testit
+    /A (*THEN) X | B (*THEN) C/x#sc#
+    ,
+    "Simple (*THEN) test"
+    ;
+ +

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.

+ +

13 Jul 2021, 8b36de8.

+ +
+
Fix problem with side comment after pointer, part 3
+
+ +

This update fixes some incorrect tokenization produced by a side comment placed between a pointer and a bareword as in this snippet:

+ +
    sub tzoffset {};
+
+    ...
+
+    my $J
+    +=
+    (
+    $self
+    ->#sc
+    tzoffset
+    / (
+    24
+    *
+    3600
+    )
+    );
+ +

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, cab7ed3.

+ +
+
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, 7afee47.

+ +
+
Fix error parsing sub attributes with side comment
+
+ +

Testing with side comments produced an error in the following snippet:

+ +
    sub plugh () :#
+      Ugly('\(") : Bad;
+ +

This is fixed in this update, case c038.

+ +

11 Jul 2021, 80f2a3a.

+ +
+
Fix case b1172, a failure to converge
+
+ +

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, 47e7f9b.

+ +
+
Avoid line breaks before a slash in certain cases
+
+ +

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.

+ +

This fixes case c039.

+ +

10 Jul 2021, 461199c.

+ +
+
Removed warning message if ending in code skipping section
+
+ +

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.

+ +

10 Jul 2021, 461199c.

+ +
+
Improve logic for distinguishing a pattern vs a division
+
+ +

Testing with side comments produced the following snippet which caused a error due to the side comment on the '/'

+ +
    $bond_str
+    =
+    VERY_WEAK #sc#
+    / #sc#
+    1.05
+    ;
+ +

Several related examples were found in which side comments triggered errors. For example

+ +
    ok
+    /[^\s]+/#sc#
+    ,
+    'm/[^\s]/ utf8'
+    ;
+ +

This update fixes these problems, case c040.

+ +

9 Jul 2021, ffe4351.

+ +
+
Fix problem caused by side comment after ++
+
+ +

Testing with side comments produced an incorrect error message for this snippet:

+ +
    xxx 
+    ++#
+    $test, 
+    Internals::SvREADONLY( %$copy) , 
+    "cloned hash restricted?" ;
+ +

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.

+ +

8 Jul 2021, 20cc9a0.

+ +
+
Fix problem caused by side comment after pointer, part 2
+
+ +

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.

+ +
    @ret
+    =
+    $o
+    ->#
+    SUPER'method
+    (
+    'whatever'
+    )
+    ;
+ +

This is fixed in this update, case c041.

+ +

7 Jul 2021, 1806772.

+ +
+
Fix problem caused by side comment after pointer
+
+ +

The following test script

+ +
    is(
+    $one
+    ->#sc#
+    package
+    ,
+    "bar"
+    ,
+    "Got package"
+    )
+    ;
+ +

Caused the following error message:

+ +
  4: package
+     ^
+  found package where operator expected
+ +

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.

+ +

This is fixed in this update, case c037, 96f2ebb.

+ +
+
Fix error parsing '%#' and similar combinations
+
+ +

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:

+ +
    # 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";
+ +

This fixes case c036.

+ +

6 Jul 2021, e233d41.

+ +
+
Fix error parsing '&#'
+
+ +

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 '#').

+ +
    print$my_bag
+    &#sc#
+    $your_bag
+    ,
+    "\n"
+    ;
+ +

This update fixes this issue, c033.

+ +

5 Jul 2021, 0d784e0.

+ +
+
Fix error parsing format statement
+
+ +

The following test script caused an error when perltidy took 'format' to start a format statement.

+ +
    my$ascii#sc#
+    =#sc#
+    $formatter#sc#
+    ->#sc#
+    format#sc#
+    (#sc#
+    $html#sc#
+    )#sc#
+    ;#sc#
+ +

This was fixed by requiring a format statement to begin where a new statement can occur. This fixes issue c035.

+ +

5 Jan 2021, 2ef16fb.

+ +
+
Fix some incorrect error messages due to side comments
+
+ +

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.

+ +
    $Msg#sc#
+    ->#sc#
+    $field#sc#
+    (#sc#
+    )#sc#
+    ;#sc#
+ +

This update fixes cases c029 and c030.

+ +

4 Jul 2021, caffc2c.

+ +
+
Fix undefined var ref involving --format-skipping
+
+ +

Testing produced a situation in which version 20200625 could cause an undefined variable to be accessed (the variable 'Ktoken_vars') as in this snippet:

+ +
    #!/usr/bin/perl
+    #<<<
+        my $ra= (
+            [ 'Shine', 40 ], [ 'Specular', [ 1, 1, 0.3, 0 ] ] );
+    #<<<
+    ...
+ +

The conditions for this to happen are:

+ +
  (1) format skipping (#<<<) begins before the first line of code, and
+  (2) the format skipping section contains the two successive characters ', ['.
+ +

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.

+ +

This update fixes this problem.

+ +

4 Jul 2021, 82916fe.

+ +
+
Check for side comment within package statement
+
+ +

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:

+ +
    package double # side comment
+    ;
+ +

This update fixes this. 3 Jul 2021, c00059a.

+ +
+
Fix problem with -comma-arrow-breakpoint=n flag
+
+ +

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.

+ +

1 Jul 2021, 021b938.

+ +
+
Fix a formatting instability
+
+ +

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.

+ +

1 Jul 2021, 021b938.

+ +
+
Fixed use of uninitialized value
+
+ +

The previous Tokenizer update caused the use of an unitialized value when run on case b1053:

+ +
 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
+ +

This update fixes this.

+ +

1 Jul 2021, ea139bd.

+ +
+
Fix token type of colon introducing anonomyous sub attribute list
+
+ +

In the following example

+ +
    print "not " unless ref +(
+        map {
+            sub : lvalue { "a" }
+        } 1
+    )[0] eq "CODE";
+ +

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.

+ +

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:

+ +
    my $xx = 0;
+    sub : {
+        $xx++;
+        print "looping with label sub:, a=$xx\n";
+        if ( $xx < 10 ) { goto "sub" }
+    }
+ +

In this case, the goto statement needs quotes around "sub" because it is a keyword.

+ +

29 Jun 2021, d5fb3d5.

+ +
+
Minor adjustments to improve formatting stability
+
+ +

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.

+ +

28 Jun 2021, e1f22e0.

+ +
+
Remove limit on -ci=n when -xci is set, see rt #136415
+
+ +

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.

+ +

28 Jun 2021, 1b3c5e9.

+ +
+
Minor optimization
+
+ +

Added a quick check to bypass a needless sub call.

+ +

26 Jan 2021, e7822df.

+ +
+
Eliminate token variable _LEVEL_TRUE_
+
+ +

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.

+ +

26 Jun 2021, 1f4f78c.

+ +
+
Eliminate token variable _CONTAINER_ENVIRONMENT_
+
+ +

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.

+ +

26 Jun 2021, 300ca1e.

+ +
+
+

Issues fixed after release 20210402

+
Release 20210625
+
+ +

24 Jun 2021, a4ff53d.

+ +
Adjust tolerances to fix some unstable edge cases
@@ -34,7 +440,7 @@

There are no other known cases of formatting instability at the present time, but testing with random input parameters will continue.

-

21 Jun 2021.

+

21 Jun 2021, 1b682fd.

Adjust tolerances to fix some unstable edge cases
@@ -745,7 +1151,7 @@

This fixes cases b1125 b1126 b1127.

-

2 May 2021i, dac97cb.

+

2 May 2021, dac97cb.

Avoid instability of combination -bbx=2 -lp and -xci
diff --git a/docs/ChangeLog.html b/docs/ChangeLog.html index 9e27ae07..5da04d46 100644 --- a/docs/ChangeLog.html +++ b/docs/ChangeLog.html @@ -1,22 +1,56 @@

Perltidy Change Log

+

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 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
+
+

2021 06 25

-
- 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 
+
- 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
diff --git a/docs/Tidy.html b/docs/Tidy.html
index 50966cfe..7f1f7fc1 100644
--- a/docs/Tidy.html
+++ b/docs/Tidy.html
@@ -372,7 +372,7 @@
 
 

VERSION

-

This man page documents Perl::Tidy version 20210625

+

This man page documents Perl::Tidy version 20210717

LICENSE

diff --git a/docs/perltidy.html b/docs/perltidy.html index 107db3f2..ec997a40 100644 --- a/docs/perltidy.html +++ b/docs/perltidy.html @@ -3701,7 +3701,7 @@

VERSION

-

This man page documents perltidy version 20210625

+

This man page documents perltidy version 20210717

BUG REPORTS

diff --git a/lib/Perl/Tidy.pm b/lib/Perl/Tidy.pm index 40ffb169..ffeb8b80 100644 --- a/lib/Perl/Tidy.pm +++ b/lib/Perl/Tidy.pm @@ -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) { diff --git a/lib/Perl/Tidy.pod b/lib/Perl/Tidy.pod index 49fd2a09..138b336e 100644 --- a/lib/Perl/Tidy.pod +++ b/lib/Perl/Tidy.pod @@ -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 diff --git a/lib/Perl/Tidy/Debugger.pm b/lib/Perl/Tidy/Debugger.pm index 350ec98b..8eeb2d1c 100644 --- a/lib/Perl/Tidy/Debugger.pm +++ b/lib/Perl/Tidy/Debugger.pm @@ -7,7 +7,7 @@ package Perl::Tidy::Debugger; use strict; use warnings; -our $VERSION = '20210625.02'; +our $VERSION = '20210717'; sub new { diff --git a/lib/Perl/Tidy/DevNull.pm b/lib/Perl/Tidy/DevNull.pm index d5832f12..2b703ee7 100644 --- a/lib/Perl/Tidy/DevNull.pm +++ b/lib/Perl/Tidy/DevNull.pm @@ -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 } diff --git a/lib/Perl/Tidy/Diagnostics.pm b/lib/Perl/Tidy/Diagnostics.pm index b0e1934c..c74ab9ac 100644 --- a/lib/Perl/Tidy/Diagnostics.pm +++ b/lib/Perl/Tidy/Diagnostics.pm @@ -20,7 +20,7 @@ package Perl::Tidy::Diagnostics; use strict; use warnings; -our $VERSION = '20210625.02'; +our $VERSION = '20210717'; sub AUTOLOAD { diff --git a/lib/Perl/Tidy/FileWriter.pm b/lib/Perl/Tidy/FileWriter.pm index ac6cd6ed..9a9d62f2 100644 --- a/lib/Perl/Tidy/FileWriter.pm +++ b/lib/Perl/Tidy/FileWriter.pm @@ -7,7 +7,7 @@ package Perl::Tidy::FileWriter; use strict; use warnings; -our $VERSION = '20210625.02'; +our $VERSION = '20210717'; use constant DEVEL_MODE => 0; diff --git a/lib/Perl/Tidy/Formatter.pm b/lib/Perl/Tidy/Formatter.pm index a24492de..a83e1c43 100644 --- a/lib/Perl/Tidy/Formatter.pm +++ b/lib/Perl/Tidy/Formatter.pm @@ -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() diff --git a/lib/Perl/Tidy/HtmlWriter.pm b/lib/Perl/Tidy/HtmlWriter.pm index b9299a8b..8c11ee5a 100644 --- a/lib/Perl/Tidy/HtmlWriter.pm +++ b/lib/Perl/Tidy/HtmlWriter.pm @@ -7,7 +7,7 @@ package Perl::Tidy::HtmlWriter; use strict; use warnings; -our $VERSION = '20210625.02'; +our $VERSION = '20210717'; use File::Basename; diff --git a/lib/Perl/Tidy/IOScalar.pm b/lib/Perl/Tidy/IOScalar.pm index a14e5bda..1a96c54a 100644 --- a/lib/Perl/Tidy/IOScalar.pm +++ b/lib/Perl/Tidy/IOScalar.pm @@ -10,7 +10,7 @@ package Perl::Tidy::IOScalar; use strict; use warnings; use Carp; -our $VERSION = '20210625.02'; +our $VERSION = '20210717'; sub AUTOLOAD { diff --git a/lib/Perl/Tidy/IOScalarArray.pm b/lib/Perl/Tidy/IOScalarArray.pm index f185a573..640459b8 100644 --- a/lib/Perl/Tidy/IOScalarArray.pm +++ b/lib/Perl/Tidy/IOScalarArray.pm @@ -14,7 +14,7 @@ package Perl::Tidy::IOScalarArray; use strict; use warnings; use Carp; -our $VERSION = '20210625.02'; +our $VERSION = '20210717'; sub AUTOLOAD { diff --git a/lib/Perl/Tidy/IndentationItem.pm b/lib/Perl/Tidy/IndentationItem.pm index ea59c5ad..14e00719 100644 --- a/lib/Perl/Tidy/IndentationItem.pm +++ b/lib/Perl/Tidy/IndentationItem.pm @@ -8,7 +8,7 @@ package Perl::Tidy::IndentationItem; use strict; use warnings; -our $VERSION = '20210625.02'; +our $VERSION = '20210717'; BEGIN { diff --git a/lib/Perl/Tidy/LineBuffer.pm b/lib/Perl/Tidy/LineBuffer.pm index d695102d..d77a8412 100644 --- a/lib/Perl/Tidy/LineBuffer.pm +++ b/lib/Perl/Tidy/LineBuffer.pm @@ -12,7 +12,7 @@ package Perl::Tidy::LineBuffer; use strict; use warnings; -our $VERSION = '20210625.02'; +our $VERSION = '20210717'; sub AUTOLOAD { diff --git a/lib/Perl/Tidy/LineSink.pm b/lib/Perl/Tidy/LineSink.pm index 2cabaebc..a3cee83e 100644 --- a/lib/Perl/Tidy/LineSink.pm +++ b/lib/Perl/Tidy/LineSink.pm @@ -8,7 +8,7 @@ package Perl::Tidy::LineSink; use strict; use warnings; -our $VERSION = '20210625.02'; +our $VERSION = '20210717'; sub AUTOLOAD { diff --git a/lib/Perl/Tidy/LineSource.pm b/lib/Perl/Tidy/LineSource.pm index bd95f0e7..f4798ca9 100644 --- a/lib/Perl/Tidy/LineSource.pm +++ b/lib/Perl/Tidy/LineSource.pm @@ -8,7 +8,7 @@ package Perl::Tidy::LineSource; use strict; use warnings; -our $VERSION = '20210625.02'; +our $VERSION = '20210717'; sub AUTOLOAD { diff --git a/lib/Perl/Tidy/Logger.pm b/lib/Perl/Tidy/Logger.pm index 74214ad3..14927e8e 100644 --- a/lib/Perl/Tidy/Logger.pm +++ b/lib/Perl/Tidy/Logger.pm @@ -7,7 +7,7 @@ package Perl::Tidy::Logger; use strict; use warnings; -our $VERSION = '20210625.02'; +our $VERSION = '20210717'; sub AUTOLOAD { diff --git a/lib/Perl/Tidy/Tokenizer.pm b/lib/Perl/Tidy/Tokenizer.pm index 0ced2cf2..c012e47f 100644 --- a/lib/Perl/Tidy/Tokenizer.pm +++ b/lib/Perl/Tidy/Tokenizer.pm @@ -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; diff --git a/lib/Perl/Tidy/VerticalAligner.pm b/lib/Perl/Tidy/VerticalAligner.pm index f77d47fe..7613ee29 100644 --- a/lib/Perl/Tidy/VerticalAligner.pm +++ b/lib/Perl/Tidy/VerticalAligner.pm @@ -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; diff --git a/lib/Perl/Tidy/VerticalAligner/Alignment.pm b/lib/Perl/Tidy/VerticalAligner/Alignment.pm index 6d34f664..79849c65 100644 --- a/lib/Perl/Tidy/VerticalAligner/Alignment.pm +++ b/lib/Perl/Tidy/VerticalAligner/Alignment.pm @@ -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 diff --git a/lib/Perl/Tidy/VerticalAligner/Line.pm b/lib/Perl/Tidy/VerticalAligner/Line.pm index 5304248a..72f9512a 100644 --- a/lib/Perl/Tidy/VerticalAligner/Line.pm +++ b/lib/Perl/Tidy/VerticalAligner/Line.pm @@ -8,7 +8,7 @@ package Perl::Tidy::VerticalAligner::Line; use strict; use warnings; -our $VERSION = '20210625.02'; +our $VERSION = '20210717'; BEGIN { my $i = 0; diff --git a/local-docs/BugLog.pod b/local-docs/BugLog.pod index 536903be..4e79e066 100644 --- a/local-docs/BugLog.pod +++ b/local-docs/BugLog.pod @@ -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 @@ -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 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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 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 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 diff --git a/local-docs/Release-Checklist.md b/local-docs/Release-Checklist.md index 96e5eb0f..c13eb656 100644 --- a/local-docs/Release-Checklist.md +++ b/local-docs/Release-Checklist.md @@ -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 diff --git a/local-docs/perl2web.pod b/local-docs/perl2web.pod index fbc60c6f..c9798f7b 100644 --- a/local-docs/perl2web.pod +++ b/local-docs/perl2web.pod @@ -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 diff --git a/local-docs/tutorial.pod b/local-docs/tutorial.pod index 76a87dc0..c5297a3b 100644 --- a/local-docs/tutorial.pod +++ b/local-docs/tutorial.pod @@ -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. -- 2.39.5