From a8b0ba9a72b60d29f30920b0e24017eb25441000 Mon Sep 17 00:00:00 2001 From: Steve Hancock Date: Thu, 2 Jun 2022 06:50:02 -0700 Subject: [PATCH] set tentative next release at 20220613 --- CHANGES.md | 30 ++++++++++++++------- bin/perltidy | 13 +++++---- docs/ChangeLog.html | 31 +++++++++++++++------- docs/Tidy.html | 2 +- docs/perltidy.html | 7 ++--- lib/Perl/Tidy.pm | 2 +- 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/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 +- 23 files changed, 70 insertions(+), 49 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 9307ef2a..2a8a11ee 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,8 +1,12 @@ # Perltidy Change Log -## 2022 06 01 +## 2022 06 13 - - Please note the following two significant changes in this distribution: + - No significant bugs have been found since the last release but users + of programs which call the Perl::Tidy module should note the first + item below, which changes a default setting. The main change to + existing formatting is the second item below, which adds vertical + alignment to 'use' statements. - The flag --encode-output-strings, or -eos, is now set 'on' by default. This has no effect on the use of the 'perltidy' binary script, but could @@ -15,12 +19,12 @@ https://github.com/perltidy/perltidy/blob/master/docs/eos_flag.md - - Add vertical alignment for qw quotes and empty parens in 'use' + - Added vertical alignment for qw quotes and empty parens in 'use' statements (see issue #git 93). This new alignment is 'on' by default and will change formatting as shown below. If this is not wanted it can be turned off with the parameter -vxl='q' (--valign-exclude-list='q'). - # old default or -vxl='q' + # old default, or -vxl='q' use Getopt::Long qw(GetOptions); use Fcntl qw(O_RDONLY O_WRONLY O_EXCL O_CREAT); use Symbol qw(gensym); @@ -32,19 +36,25 @@ use Symbol qw(gensym); use Exporter (); + - The parameter -kbb (--keep-break-before) now ignores a request to break + before an opening token, such as '('. Likewise, -kba (--keep-break-after) + now ignores a request to break after a closing token, such as ')'. This + change was made to avoid a rare instability discovered in random testing. + - Previously, if a -dsc command was used to delete all side comments, - then any special control comments for non-indenting braces got deleted too. - Now, these control side comments are retained when -dsc is set unless - a -nnib (--nonon-indenting-braces) flag is also set to deactivate them. + then any special side comments for controlling non-indenting braces got + deleted too. Now, these control side comments are retained when -dsc is + set unless a -nnib (--nonon-indenting-braces) flag is also set to + deactivate them. - - This version runs 15 to 20 percent faster on large files than the - previous release due to optimizations made with the help of Devel::NYTProf. + - This version runs about 10 percent faster on large files than the previous + release due to optimizations made with the help of Devel::NYTProf. Much + of the gain came from faster processing of blank tokens and comments. - This version of perltidy was stress-tested for many cpu hours with random input parameters. No failures to converge, internal fault checks, undefined variable references or other irregularities were seen. - ## 2022 02 17 - A new flag, --encode-output-strings, or -eos, has been added to resolve diff --git a/bin/perltidy b/bin/perltidy index 01db4424..7a5501e7 100755 --- a/bin/perltidy +++ b/bin/perltidy @@ -3643,18 +3643,17 @@ parameters): 'F' matches if 'f' does not. 'w' matches if either 'k' or 'f' match. 'W' matches if 'w' does not. + '*' always matches So for example the the following parameter will keep breaks after opening function call parens: perltidy -kba='f(' -B: To match all opening curly braces, and no other opening tokens, please -prefix the brace it with an asterisk, like this: '*{'. Otherwise a warning -message will occur. This is necessary to avoid problems while the input scheme -is being updated and generalized. A single bare curly brace previously matched -all container tokens, and tentatively still does. Likewise, to match all -closing curly braces, and no other closing tokens, use '*}'. +B: A request to break before an opening container, such as B<-kbb='('>, +will be silently ignored because it can lead to formatting instability. +Likewise, a request to break after a closing container, such as B<-kba>=')', +will also be silently ignored. =item B<-iob>, B<--ignore-old-breakpoints> @@ -5168,7 +5167,7 @@ The perltidy binary uses the Perl::Tidy module and is installed when that module =head1 VERSION -This man page documents perltidy version 20220601 +This man page documents perltidy version 20220613 =head1 BUG REPORTS diff --git a/docs/ChangeLog.html b/docs/ChangeLog.html index 09e14393..90acabb9 100644 --- a/docs/ChangeLog.html +++ b/docs/ChangeLog.html @@ -1,8 +1,12 @@

Perltidy Change Log

-

2022 06 01

+

2022 06 13

-
- Please note the following two significant changes in this distribution:
+
- No significant bugs have been found since the last release but users
+  of programs which call the Perl::Tidy module should note the first
+  item below, which changes a default setting.  The main change to
+  existing formatting is the second item below, which adds vertical
+  alignment to 'use' statements.
 
 - The flag --encode-output-strings, or -eos, is now set 'on' by default.
   This has no effect on the use of the 'perltidy' binary script, but could
@@ -15,12 +19,12 @@
 
   https://github.com/perltidy/perltidy/blob/master/docs/eos_flag.md
 
-- Add vertical alignment for qw quotes and empty parens in 'use'
+- Added vertical alignment for qw quotes and empty parens in 'use'
   statements (see issue #git 93).  This new alignment is 'on' by default
   and will change formatting as shown below. If this is not wanted it can
   be turned off with the parameter -vxl='q' (--valign-exclude-list='q').
 
-    # old default or -vxl='q'
+    # old default, or -vxl='q'
     use Getopt::Long qw(GetOptions);
     use Fcntl qw(O_RDONLY O_WRONLY O_EXCL O_CREAT);
     use Symbol qw(gensym);
@@ -32,13 +36,20 @@
     use Symbol       qw(gensym);
     use Exporter     ();
 
-- Previously, if a -dsc command was used to delete all side comments,
-  then any special control comments for non-indenting braces got deleted too.
-  Now, these control side comments are retained when -dsc is set unless
-  a -nnib (--nonon-indenting-braces) flag is also set to deactivate them.
+- The parameter -kbb (--keep-break-before) now ignores a request to break
+  before an opening token, such as '('.  Likewise, -kba (--keep-break-after)
+  now ignores a request to break after a closing token, such as ')'. This
+  change was made to avoid a rare instability discovered in random testing.
 
-- This version runs 15 to 20 percent faster on large files than the
-  previous release due to optimizations made with the help of Devel::NYTProf.
+- Previously, if a -dsc command was used to delete all side comments,
+  then any special side comments for controlling non-indenting braces got
+  deleted too. Now, these control side comments are retained when -dsc is
+  set unless a -nnib (--nonon-indenting-braces) flag is also set to
+  deactivate them.
+
+- This version runs about 10 percent faster on large files than the previous
+  release due to optimizations made with the help of Devel::NYTProf.  Much
+  of the gain came from faster processing of blank tokens and comments.
 
 - This version of perltidy was stress-tested for many cpu hours with
   random input parameters. No failures to converge, internal fault checks,
diff --git a/docs/Tidy.html b/docs/Tidy.html
index afe49e59..ae33f1d7 100644
--- a/docs/Tidy.html
+++ b/docs/Tidy.html
@@ -401,7 +401,7 @@
 
 

VERSION

-

This man page documents Perl::Tidy version 20220601

+

This man page documents Perl::Tidy version 20220613

LICENSE

diff --git a/docs/perltidy.html b/docs/perltidy.html index 93ef5005..a9923d3a 100644 --- a/docs/perltidy.html +++ b/docs/perltidy.html @@ -2890,13 +2890,14 @@ 'f' matches if the previous token is a function other than a keyword. 'F' matches if 'f' does not. 'w' matches if either 'k' or 'f' match. - 'W' matches if 'w' does not.
+ 'W' matches if 'w' does not. + '*' always matches

So for example the the following parameter will keep breaks after opening function call parens:

   perltidy -kba='f('
-

NOTE: To match all opening curly braces, and no other opening tokens, please prefix the brace it with an asterisk, like this: '*{'. Otherwise a warning message will occur. This is necessary to avoid problems while the input scheme is being updated and generalized. A single bare curly brace previously matched all container tokens, and tentatively still does. Likewise, to match all closing curly braces, and no other closing tokens, use '*}'.

+

NOTE: A request to break before an opening container, such as -kbb='(', will be silently ignored because it can lead to formatting instability. Likewise, a request to break after a closing container, such as -kba=')', will also be silently ignored.

-iob, --ignore-old-breakpoints
@@ -4005,7 +4006,7 @@

VERSION

-

This man page documents perltidy version 20220601

+

This man page documents perltidy version 20220613

BUG REPORTS

diff --git a/lib/Perl/Tidy.pm b/lib/Perl/Tidy.pm index 4418ede6..211b8ad7 100644 --- a/lib/Perl/Tidy.pm +++ b/lib/Perl/Tidy.pm @@ -113,7 +113,7 @@ BEGIN { # Release version must be bumped, and it is probably past time for a # release anyway. - $VERSION = '20220601'; + $VERSION = '20220613'; } sub DESTROY { diff --git a/lib/Perl/Tidy.pod b/lib/Perl/Tidy.pod index 311bf174..bbb6bfe4 100644 --- a/lib/Perl/Tidy.pod +++ b/lib/Perl/Tidy.pod @@ -475,7 +475,7 @@ The module 'Perl::Tidy' comes with a binary 'perltidy' which is installed when t =head1 VERSION -This man page documents Perl::Tidy version 20220601 +This man page documents Perl::Tidy version 20220613 =head1 LICENSE diff --git a/lib/Perl/Tidy/Debugger.pm b/lib/Perl/Tidy/Debugger.pm index a9150cb2..5227325d 100644 --- a/lib/Perl/Tidy/Debugger.pm +++ b/lib/Perl/Tidy/Debugger.pm @@ -8,7 +8,7 @@ package Perl::Tidy::Debugger; use strict; use warnings; use English qw( -no_match_vars ); -our $VERSION = '20220601'; +our $VERSION = '20220613'; use constant EMPTY_STRING => q{}; use constant SPACE => q{ }; diff --git a/lib/Perl/Tidy/DevNull.pm b/lib/Perl/Tidy/DevNull.pm index 46ae3ba3..daa63da6 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 = '20220601'; +our $VERSION = '20220613'; 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 74765372..af81a0cf 100644 --- a/lib/Perl/Tidy/Diagnostics.pm +++ b/lib/Perl/Tidy/Diagnostics.pm @@ -21,7 +21,7 @@ package Perl::Tidy::Diagnostics; use strict; use warnings; use English qw( -no_match_vars ); -our $VERSION = '20220601'; +our $VERSION = '20220613'; use constant EMPTY_STRING => q{}; diff --git a/lib/Perl/Tidy/FileWriter.pm b/lib/Perl/Tidy/FileWriter.pm index 1c351bce..f16a4112 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 = '20220601'; +our $VERSION = '20220613'; use constant DEVEL_MODE => 0; use constant EMPTY_STRING => q{}; diff --git a/lib/Perl/Tidy/HtmlWriter.pm b/lib/Perl/Tidy/HtmlWriter.pm index b63e0dd2..ac1abb2b 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 = '20220601'; +our $VERSION = '20220613'; use English qw( -no_match_vars ); use File::Basename; diff --git a/lib/Perl/Tidy/IOScalar.pm b/lib/Perl/Tidy/IOScalar.pm index d2d2d3ba..d74960f6 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 = '20220601'; +our $VERSION = '20220613'; use constant EMPTY_STRING => q{}; diff --git a/lib/Perl/Tidy/IOScalarArray.pm b/lib/Perl/Tidy/IOScalarArray.pm index 59c45ec5..6f9f768e 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 = '20220601'; +our $VERSION = '20220613'; sub AUTOLOAD { diff --git a/lib/Perl/Tidy/IndentationItem.pm b/lib/Perl/Tidy/IndentationItem.pm index 6f091590..635eb296 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 = '20220601'; +our $VERSION = '20220613'; BEGIN { diff --git a/lib/Perl/Tidy/LineBuffer.pm b/lib/Perl/Tidy/LineBuffer.pm index 773492c5..bdd51a51 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 = '20220601'; +our $VERSION = '20220613'; sub AUTOLOAD { diff --git a/lib/Perl/Tidy/LineSink.pm b/lib/Perl/Tidy/LineSink.pm index 780573f0..ae0bfd20 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 = '20220601'; +our $VERSION = '20220613'; sub AUTOLOAD { diff --git a/lib/Perl/Tidy/LineSource.pm b/lib/Perl/Tidy/LineSource.pm index a8105891..3306d6b2 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 = '20220601'; +our $VERSION = '20220613'; sub AUTOLOAD { diff --git a/lib/Perl/Tidy/Logger.pm b/lib/Perl/Tidy/Logger.pm index bdd5aaac..194ca81c 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 = '20220601'; +our $VERSION = '20220613'; use English qw( -no_match_vars ); use constant EMPTY_STRING => q{}; diff --git a/lib/Perl/Tidy/Tokenizer.pm b/lib/Perl/Tidy/Tokenizer.pm index 95f88255..be828299 100644 --- a/lib/Perl/Tidy/Tokenizer.pm +++ b/lib/Perl/Tidy/Tokenizer.pm @@ -23,7 +23,7 @@ use strict; use warnings; use English qw( -no_match_vars ); -our $VERSION = '20220601'; +our $VERSION = '20220613'; use constant DEVEL_MODE => 0; use constant EMPTY_STRING => q{}; diff --git a/lib/Perl/Tidy/VerticalAligner.pm b/lib/Perl/Tidy/VerticalAligner.pm index 1b87384c..a5b2245a 100644 --- a/lib/Perl/Tidy/VerticalAligner.pm +++ b/lib/Perl/Tidy/VerticalAligner.pm @@ -3,7 +3,7 @@ use strict; use warnings; use Carp; use English qw( -no_match_vars ); -our $VERSION = '20220601'; +our $VERSION = '20220613'; 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 5ecfa1c6..078689bb 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 = '20220601'; +our $VERSION = '20220613'; BEGIN { diff --git a/lib/Perl/Tidy/VerticalAligner/Line.pm b/lib/Perl/Tidy/VerticalAligner/Line.pm index 0b5063bc..ab679de3 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 = '20220601'; +our $VERSION = '20220613'; BEGIN { -- 2.39.5