From 3c992ae6dafe2563d9a4645358327c57f35dc1db Mon Sep 17 00:00:00 2001 From: Steve Hancock Date: Wed, 15 May 2024 16:31:06 -0700 Subject: [PATCH] bump to v20240511.02 --- CHANGES.md | 5 ++- MANIFEST | 1 + bin/perltidy | 2 +- docs/ChangeLog.html | 39 ++++++++++++++-------- docs/Tidy.html | 2 +- docs/perltidy.html | 28 +++++++++++----- lib/Perl/Tidy.pm | 2 +- lib/Perl/Tidy.pod | 2 +- lib/Perl/Tidy/Debugger.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/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 +- 21 files changed, 67 insertions(+), 40 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 56fb9b38..9303b5a9 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,6 +1,9 @@ # Perltidy Change Log -## 2024 05 11.01 +## 2024 05 11.02 + + - Fix issue git #143, extend -add-trailing-commas to apply to a list + with just a fat comma. - Fix issue git #142, test failure installing on perl versions before version 5.10. The error caused the new parameter diff --git a/MANIFEST b/MANIFEST index d4060a22..0070037d 100644 --- a/MANIFEST +++ b/MANIFEST @@ -78,6 +78,7 @@ t/snippets27.t t/snippets28.t t/snippets29.t t/snippets3.t +t/snippets30.t t/snippets4.t t/snippets5.t t/snippets6.t diff --git a/bin/perltidy b/bin/perltidy index f639bbab..e74020d7 100755 --- a/bin/perltidy +++ b/bin/perltidy @@ -6658,7 +6658,7 @@ The perltidy binary uses the Perl::Tidy module and is installed when that module =head1 VERSION -This man page documents perltidy version 20240511.01 +This man page documents perltidy version 20240511.02 =head1 BUG REPORTS diff --git a/docs/ChangeLog.html b/docs/ChangeLog.html index 6aacdfbc..2e4ab846 100644 --- a/docs/ChangeLog.html +++ b/docs/ChangeLog.html @@ -1,5 +1,16 @@

Perltidy Change Log

+

2024 05 11.02

+ +
- Fix issue git #143, extend -add-trailing-commas to apply to a list
+  with just a fat comma.
+
+- Fix issue git #142, test failure installing on perl versions before
+  version 5.10.  The error caused the new parameter
+  -interbracket-arrow-style=s not to work. Except for this limitation,
+  Version 20240511 will work on older perl versions.
+
+

2024 05 11

- The option --valign-signed-numbers, or -vsn is now the default. It
@@ -10,20 +21,6 @@
   of vertically aligned signed and unsigned numbers.
   Use -nvsn to turn this option off and avoid this change.
 
-- Previously, a line break was made before a short concatenated terminal
-  quoted string, such as "\n", if the previous line had a greater
-  starting indentation. The break is now placed after the short quote.
-  This keeps code a little more compact. For example:
-
-# old rule: break before "\n" here because '$name' has more indentation:
-my $html = $this->SUPER::genObject( $query, $bindNode, $field . ":$var",
-    $name, "remove", "UNCHECKED" )
-  . "\n";
-
-# new rule: break after a short terminal quote like "\n" for compactness;
-my $html = $this->SUPER::genObject( $query, $bindNode, $field . ":$var",
-    $name, "remove", "UNCHECKED" ) . "\n";
-
 - The option --delete-repeated-commas is now the default.
 
   It makes the following checks and changes:
@@ -34,6 +31,20 @@ my $html = $this->SUPER::genObject( $query, $bindNode, $field . ":$var",
 
   Use --nodelete-repeated-commas, or -ndrc, to retain repeated commas.
 
+- Previously, a line break was always made before a concatenated
+  quoted string, such as "\n", if the previous line had a greater
+  starting indentation. An exception is now made for a short concatenated
+  terminal quote.  This keeps code a little more compact. For example:
+
+# basic rule: break before "\n" here because '$name' has more indentation:
+my $html = $this->SUPER::genObject( $query, $bindNode, $field . ":$var",
+    $name, "remove", "UNCHECKED" )
+  . "\n";
+
+# modified rule: make an exception for a short terminal quote like "\n"
+my $html = $this->SUPER::genObject( $query, $bindNode, $field . ":$var",
+    $name, "remove", "UNCHECKED" ) . "\n";
+
 - The operator ``**=`` now has spaces on both sides by default. Previously,
   there was no space on the left.  This change makes its spacing the same
   as all other assignment operators. The previous behavior can be obtained
diff --git a/docs/Tidy.html b/docs/Tidy.html
index 55d6659f..672d5c1b 100644
--- a/docs/Tidy.html
+++ b/docs/Tidy.html
@@ -399,7 +399,7 @@
 
 

VERSION

-

This man page documents Perl::Tidy version 20240511

+

This man page documents Perl::Tidy version 20240511.02

LICENSE

diff --git a/docs/perltidy.html b/docs/perltidy.html index 6a3ffb71..c85cfa86 100644 --- a/docs/perltidy.html +++ b/docs/perltidy.html @@ -745,7 +745,8 @@

A second optional item of information which can be given for parentheses is an alphanumeric letter which is used to limit the selection further depending on the type of token immediately before the paren. The possible letters are currently 'k', 'K', 'f', 'F', 'w', and 'W', with these meanings for matching whatever precedes an opening paren:

-
 'k' matches if the previous nonblank token is a perl built-in keyword (such as 'if', 'while'),
+
 'k' matches if the previous nonblank token is a perl built-in keyword
+     (such as 'if', 'while'),
  'K' matches if 'k' does not, meaning that the previous token is not a keyword.
  'f' matches if the previous token is a function other than a keyword.
  'F' matches if 'f' does not.
@@ -3000,9 +3001,18 @@
 
 

A trailing comma is a comma following the last item of a list. Perl allows trailing commas but they are not required. By default, perltidy does not add or delete trailing commas, but it is possible to manipulate them with the following set of three related parameters:

-
  --want-trailing-commas=s, -wtc=s - defines where trailing commas are wanted
-  --add-trailing-commas,    -atc   - gives permission to add trailing commas to match the style wanted
-  --delete-trailing-commas, -dtc   - gives permission to delete trailing commas which do not match the style wanted
+
    + +
  • --want-trailing-commas=s, -wtc=s - defines where trailing commas are wanted

    + +
  • +
  • --add-trailing-commas, -atc - gives permission to add trailing commas to match the style wanted

    + +
  • +
  • --delete-trailing-commas, -dtc - gives permission to delete trailing commas which do not match the style wanted

    + +
  • +

The parameter --want-trailing-commas=s, or -wtc=s, defines a preferred style. The string s indicates which lists should get trailing commas, as follows:

@@ -3053,7 +3063,8 @@

For parentheses, an additional item of information which can be given is an alphanumeric letter which is used to limit the selection further depending on the type of token immediately before the opening paren. The possible letters are currently 'k', 'K', 'f', 'F', 'w', and 'W', with these meanings for matching whatever precedes an opening paren:

-
 'k' matches if the previous nonblank token is a perl built-in keyword (such as 'if', 'while'),
+
 'k' matches if the previous nonblank token is a perl built-in keyword
+     (such as 'if', 'while'),
  'K' matches if 'k' does not, meaning that the previous token is not a keyword.
  'f' matches if the previous token is a function other than a keyword.
  'F' matches if 'f' does not.
@@ -3070,7 +3081,7 @@
 
 
    -
  • For the implementation of these parameters, a list is basically taken to be a container of items (parens, square brackets, or braces), which is not a code block, with one or more commas. These parameters only apply to something that fits this definition of a list.

    +
  • For the implementation of these parameters, a list is basically taken to be a container of items (parens, square brackets, or braces), which is not a code block, with one or more commas or fat commas. These parameters only apply to something that fits this definition of a list.

    Note that a paren-less list of parameters is not a list by this definition, so these parameters have no effect on a paren-less list.

    @@ -3490,7 +3501,8 @@

    It is possible to be more specific in matching parentheses by preceding them with a letter. The possible letters are 'k', 'K', 'f', 'F', 'w', and 'W', with these meanings (these are the same as used in the --weld-nested-exclusion-list and --line-up-parentheses-exclusion-list parameters):

    -
     'k' matches if the previous nonblank token is a perl built-in keyword (such as 'if', 'while'),
    +
     'k' matches if the previous nonblank token is a perl built-in keyword
    +     (such as 'if', 'while'),
      'K' matches if 'k' does not, meaning that the previous token is not a keyword.
      'f' matches if the previous token is a function other than a keyword.
      'F' matches if 'f' does not.
    @@ -5200,7 +5212,7 @@
     
     

    VERSION

    -

    This man page documents perltidy version 20240511

    +

    This man page documents perltidy version 20240511.02

    BUG REPORTS

    diff --git a/lib/Perl/Tidy.pm b/lib/Perl/Tidy.pm index 6d534275..57b46be4 100644 --- a/lib/Perl/Tidy.pm +++ b/lib/Perl/Tidy.pm @@ -131,7 +131,7 @@ BEGIN { # then the Release version must be bumped, and it is probably past time for # a release anyway. - $VERSION = '20240511.01'; + $VERSION = '20240511.02'; } ## end BEGIN sub DESTROY { diff --git a/lib/Perl/Tidy.pod b/lib/Perl/Tidy.pod index 6ec3f600..1013ded2 100644 --- a/lib/Perl/Tidy.pod +++ b/lib/Perl/Tidy.pod @@ -469,7 +469,7 @@ The module 'Perl::Tidy' comes with a binary 'perltidy' which is installed when t =head1 VERSION -This man page documents Perl::Tidy version 20240511.01 +This man page documents Perl::Tidy version 20240511.02 =head1 LICENSE diff --git a/lib/Perl/Tidy/Debugger.pm b/lib/Perl/Tidy/Debugger.pm index 29ee5225..3f247ead 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 = '20240511.01'; +our $VERSION = '20240511.02'; use constant EMPTY_STRING => q{}; use constant SPACE => q{ }; diff --git a/lib/Perl/Tidy/Diagnostics.pm b/lib/Perl/Tidy/Diagnostics.pm index fd62ef76..af98709e 100644 --- a/lib/Perl/Tidy/Diagnostics.pm +++ b/lib/Perl/Tidy/Diagnostics.pm @@ -18,7 +18,7 @@ package Perl::Tidy::Diagnostics; use strict; use warnings; use English qw( -no_match_vars ); -our $VERSION = '20240511.01'; +our $VERSION = '20240511.02'; use constant EMPTY_STRING => q{}; diff --git a/lib/Perl/Tidy/FileWriter.pm b/lib/Perl/Tidy/FileWriter.pm index c4b556a1..05f3a562 100644 --- a/lib/Perl/Tidy/FileWriter.pm +++ b/lib/Perl/Tidy/FileWriter.pm @@ -16,7 +16,7 @@ package Perl::Tidy::FileWriter; use strict; use warnings; -our $VERSION = '20240511.01'; +our $VERSION = '20240511.02'; use constant DEVEL_MODE => 0; use constant EMPTY_STRING => q{}; diff --git a/lib/Perl/Tidy/Formatter.pm b/lib/Perl/Tidy/Formatter.pm index 146d7e98..e14380cc 100644 --- a/lib/Perl/Tidy/Formatter.pm +++ b/lib/Perl/Tidy/Formatter.pm @@ -76,7 +76,7 @@ use constant BACKSLASH => q{\\}; use Carp; use English qw( -no_match_vars ); use List::Util qw( min max first ); # min, max first are in Perl 5.8 -our $VERSION = '20240511.01'; +our $VERSION = '20240511.02'; # 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 80dbf097..78cd3a23 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 = '20240511.01'; +our $VERSION = '20240511.02'; use Carp; use English qw( -no_match_vars ); diff --git a/lib/Perl/Tidy/IOScalar.pm b/lib/Perl/Tidy/IOScalar.pm index 6035f28b..dd071b8d 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 = '20240511.01'; +our $VERSION = '20240511.02'; use constant DEVEL_MODE => 0; use constant EMPTY_STRING => q{}; diff --git a/lib/Perl/Tidy/IOScalarArray.pm b/lib/Perl/Tidy/IOScalarArray.pm index 9a1a54fc..297db363 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 = '20240511.01'; +our $VERSION = '20240511.02'; use constant DEVEL_MODE => 0; diff --git a/lib/Perl/Tidy/IndentationItem.pm b/lib/Perl/Tidy/IndentationItem.pm index 3cb8658b..2cc05598 100644 --- a/lib/Perl/Tidy/IndentationItem.pm +++ b/lib/Perl/Tidy/IndentationItem.pm @@ -9,7 +9,7 @@ package Perl::Tidy::IndentationItem; use strict; use warnings; -our $VERSION = '20240511.01'; +our $VERSION = '20240511.02'; BEGIN { diff --git a/lib/Perl/Tidy/Logger.pm b/lib/Perl/Tidy/Logger.pm index ad237345..ae8e8f91 100644 --- a/lib/Perl/Tidy/Logger.pm +++ b/lib/Perl/Tidy/Logger.pm @@ -8,7 +8,7 @@ package Perl::Tidy::Logger; use strict; use warnings; -our $VERSION = '20240511.01'; +our $VERSION = '20240511.02'; use Carp; use English qw( -no_match_vars ); diff --git a/lib/Perl/Tidy/Tokenizer.pm b/lib/Perl/Tidy/Tokenizer.pm index e37ad571..c63e160b 100644 --- a/lib/Perl/Tidy/Tokenizer.pm +++ b/lib/Perl/Tidy/Tokenizer.pm @@ -33,7 +33,7 @@ use strict; use warnings; use English qw( -no_match_vars ); -our $VERSION = '20240511.01'; +our $VERSION = '20240511.02'; use Carp; diff --git a/lib/Perl/Tidy/VerticalAligner.pm b/lib/Perl/Tidy/VerticalAligner.pm index 7ce86926..72893d57 100644 --- a/lib/Perl/Tidy/VerticalAligner.pm +++ b/lib/Perl/Tidy/VerticalAligner.pm @@ -5,7 +5,7 @@ use Carp; { #<<< A non-indenting brace to contain all lexical variables -our $VERSION = '20240511.01'; +our $VERSION = '20240511.02'; use English qw( -no_match_vars ); use Scalar::Util 'refaddr'; use Perl::Tidy::VerticalAligner::Alignment; diff --git a/lib/Perl/Tidy/VerticalAligner/Alignment.pm b/lib/Perl/Tidy/VerticalAligner/Alignment.pm index be0db5c3..1d0c224a 100644 --- a/lib/Perl/Tidy/VerticalAligner/Alignment.pm +++ b/lib/Perl/Tidy/VerticalAligner/Alignment.pm @@ -9,7 +9,7 @@ package Perl::Tidy::VerticalAligner::Alignment; use strict; use warnings; -our $VERSION = '20240511.01'; +our $VERSION = '20240511.02'; sub new { my ( $class, $rarg ) = @_; diff --git a/lib/Perl/Tidy/VerticalAligner/Line.pm b/lib/Perl/Tidy/VerticalAligner/Line.pm index 3746f10b..8a96e0f7 100644 --- a/lib/Perl/Tidy/VerticalAligner/Line.pm +++ b/lib/Perl/Tidy/VerticalAligner/Line.pm @@ -10,7 +10,7 @@ package Perl::Tidy::VerticalAligner::Line; use strict; use warnings; -our $VERSION = '20240511.01'; +our $VERSION = '20240511.02'; use English qw( -no_match_vars ); sub AUTOLOAD { -- 2.39.5