]> git.donarmstrong.com Git - perltidy.git/commitdiff
bump to v20240511.02 20240511.02
authorSteve Hancock <perltidy@users.sourceforge.net>
Wed, 15 May 2024 23:31:06 +0000 (16:31 -0700)
committerSteve Hancock <perltidy@users.sourceforge.net>
Wed, 15 May 2024 23:31:06 +0000 (16:31 -0700)
21 files changed:
CHANGES.md
MANIFEST
bin/perltidy
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/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/Logger.pm
lib/Perl/Tidy/Tokenizer.pm
lib/Perl/Tidy/VerticalAligner.pm
lib/Perl/Tidy/VerticalAligner/Alignment.pm
lib/Perl/Tidy/VerticalAligner/Line.pm

index 56fb9b3813e8493e1f7ecd3ae9dfecc802fa7f69..9303b5a944c088bb8ce85c1bba7287ddca93fe0e 100644 (file)
@@ -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
index d4060a2238ad638cff62e364b49fb16458de31ce..0070037dcabaefff5e2749bbb4ac8294c5f5f7a5 100644 (file)
--- 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
index f639bbabf2d657e6b03c6dc62ac3b46d80b05261..e74020d73487e49294925de7629037cde83b9e52 100755 (executable)
@@ -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
 
index 6aacdfbc7ffb58a66f97b701f6de6c1a018346a6..2e4ab846b6e3ae8d4c7487b41c568fe1a693014e 100644 (file)
@@ -1,5 +1,16 @@
 <h1>Perltidy Change Log</h1>
 
+<h2>2024 05 11.02</h2>
+
+<pre><code>- 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.
+</code></pre>
+
 <h2>2024 05 11</h2>
 
 <pre><code>- The option --valign-signed-numbers, or -vsn is now the default. It
   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-&gt;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-&gt;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-&gt;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-&gt;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-&gt;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
index 55d6659ffa1735d682d0b3918d710c7926ec057c..672d5c1b695c34155e10a763cc19a225ce50ff5e 100644 (file)
 
 <h1 id="VERSION">VERSION</h1>
 
-<p>This man page documents Perl::Tidy version 20240511</p>
+<p>This man page documents Perl::Tidy version 20240511.02</p>
 
 <h1 id="LICENSE">LICENSE</h1>
 
index 6a3ffb71f5033a1bfb56923ca749ec1b6fd73606..c85cfa862603b007c8d5d4fcf7e4d62ea90cba33 100644 (file)
 
 <p>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 &#39;k&#39;, &#39;K&#39;, &#39;f&#39;, &#39;F&#39;, &#39;w&#39;, and &#39;W&#39;, with these meanings for matching whatever precedes an opening paren:</p>
 
-<pre><code> &#39;k&#39; matches if the previous nonblank token is a perl built-in keyword (such as &#39;if&#39;, &#39;while&#39;),
+<pre><code> &#39;k&#39; matches if the previous nonblank token is a perl built-in keyword
+     (such as &#39;if&#39;, &#39;while&#39;),
  &#39;K&#39; matches if &#39;k&#39; does not, meaning that the previous token is not a keyword.
  &#39;f&#39; matches if the previous token is a function other than a keyword.
  &#39;F&#39; matches if &#39;f&#39; does not.
 
 <p>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:</p>
 
-<pre><code>  --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</code></pre>
+<ul>
+
+<li><p><b>--want-trailing-commas=s, -wtc=s</b> - defines where trailing commas are wanted</p>
+
+</li>
+<li><p><b>--add-trailing-commas, -atc</b> - gives permission to add trailing commas to match the style wanted</p>
+
+</li>
+<li><p><b>--delete-trailing-commas, -dtc</b> - gives permission to delete trailing commas which do not match the style wanted</p>
+
+</li>
+</ul>
 
 <p>The parameter <b>--want-trailing-commas=s</b>, or <b>-wtc=s</b>, defines a preferred style. The string <b>s</b> indicates which lists should get trailing commas, as follows:</p>
 
 
 <p>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 &#39;k&#39;, &#39;K&#39;, &#39;f&#39;, &#39;F&#39;, &#39;w&#39;, and &#39;W&#39;, with these meanings for matching whatever precedes an opening paren:</p>
 
-<pre><code> &#39;k&#39; matches if the previous nonblank token is a perl built-in keyword (such as &#39;if&#39;, &#39;while&#39;),
+<pre><code> &#39;k&#39; matches if the previous nonblank token is a perl built-in keyword
+     (such as &#39;if&#39;, &#39;while&#39;),
  &#39;K&#39; matches if &#39;k&#39; does not, meaning that the previous token is not a keyword.
  &#39;f&#39; matches if the previous token is a function other than a keyword.
  &#39;F&#39; matches if &#39;f&#39; does not.
 
 <ul>
 
-<li><p>For the implementation of these parameters, a <b>list</b> 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.</p>
+<li><p>For the implementation of these parameters, a <b>list</b> 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.</p>
 
 <p>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.</p>
 
 
 <p>It is possible to be more specific in matching parentheses by preceding them with a letter. The possible letters are &#39;k&#39;, &#39;K&#39;, &#39;f&#39;, &#39;F&#39;, &#39;w&#39;, and &#39;W&#39;, with these meanings (these are the same as used in the <b>--weld-nested-exclusion-list</b> and <b>--line-up-parentheses-exclusion-list</b> parameters):</p>
 
-<pre><code> &#39;k&#39; matches if the previous nonblank token is a perl built-in keyword (such as &#39;if&#39;, &#39;while&#39;),
+<pre><code> &#39;k&#39; matches if the previous nonblank token is a perl built-in keyword
+     (such as &#39;if&#39;, &#39;while&#39;),
  &#39;K&#39; matches if &#39;k&#39; does not, meaning that the previous token is not a keyword.
  &#39;f&#39; matches if the previous token is a function other than a keyword.
  &#39;F&#39; matches if &#39;f&#39; does not.
 
 <h1 id="VERSION">VERSION</h1>
 
-<p>This man page documents perltidy version 20240511</p>
+<p>This man page documents perltidy version 20240511.02</p>
 
 <h1 id="BUG-REPORTS">BUG REPORTS</h1>
 
index 6d534275ad8b98d37d8bdb26674fe485f9600e78..57b46be45393c1cf52ddab1c9357f03bc79ee6da 100644 (file)
@@ -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 {
index 6ec3f6008269553e0538a4f3c7cb16e8023c5d81..1013ded260f709c884d7417364f8142881baa06c 100644 (file)
@@ -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
 
index 29ee5225a006bdddc3c64b34f9796560917b2873..3f247ead9c96e57150aa4128905c9b9f90c3e32e 100644 (file)
@@ -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{ };
index fd62ef76e0dfa0e5630381ad227c8fac27a7795d..af98709e5a729c023959c7c20570930d4b1059ea 100644 (file)
@@ -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{};
 
index c4b556a123279a56a8368d472e64b9c0a6c50751..05f3a562108ca5eb0202bcdd0b0626608ef1545a 100644 (file)
@@ -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{};
index 146d7e987e5fdcac4c2ef23185a2099406d599f3..e14380cc60be9b72665504c768d905e93e59c7e1 100644 (file)
@@ -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()
index 80dbf097111bdeca5f105da9168712cd0fb0829d..78cd3a234dbef8e9e5b95f99ebf77f1af554e238 100644 (file)
@@ -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 );
index 6035f28ba21db86ec3df61d3955892ebdcdc1d00..dd071b8d3314f3908928152a9f90b4142e199701 100644 (file)
@@ -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{};
index 9a1a54fc9d50af98108d2690a61a1f4390cb85f7..297db36341ff507bee517368d7581b92b907d5ba 100644 (file)
@@ -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;
 
index 3cb8658b2f80aaa8fe6d68b9bfb094a181e2108e..2cc055983d36f0a08d8d8c68a2802ddeb4202101 100644 (file)
@@ -9,7 +9,7 @@ package Perl::Tidy::IndentationItem;
 use strict;
 use warnings;
 
-our $VERSION = '20240511.01';
+our $VERSION = '20240511.02';
 
 BEGIN {
 
index ad237345cf7aaf7a71b0b5a7a177a835b30a855d..ae8e8f91a3303a16b24261ad386ef3e7dae35a34 100644 (file)
@@ -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 );
 
index e37ad571dfffdb2688c2107a36d825863b8e4bd7..c63e160b52687666e17a6c088dec3966130f3ef7 100644 (file)
@@ -33,7 +33,7 @@ use strict;
 use warnings;
 use English qw( -no_match_vars );
 
-our $VERSION = '20240511.01';
+our $VERSION = '20240511.02';
 
 use Carp;
 
index 7ce86926021e89f233ab4733fc52a97f68996a1d..72893d57e078431f7be730e01790e2480ef7cad2 100644 (file)
@@ -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;
index be0db5c3f0be5ac68fd1826b7e3d394d95473864..1d0c224abcb7907393176ca73bb58609148d34fb 100644 (file)
@@ -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 ) = @_;
index 3746f10b69c44e14f2054832f8a5bb9bf60bad1c..8a96e0f7a9b09da653e25da34f9c809ffe9dbf33 100644 (file)
@@ -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 {