]> git.donarmstrong.com Git - perltidy.git/commitdiff
bump version to 20240903.01 20240903.01
authorSteve Hancock <perltidy@users.sourceforge.net>
Tue, 10 Sep 2024 14:08:37 +0000 (07:08 -0700)
committerSteve Hancock <perltidy@users.sourceforge.net>
Tue, 10 Sep 2024 14:08:37 +0000 (07:08 -0700)
20 files changed:
CHANGES.md
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 cd427c225557af0398a55b2270dff2d54ef4f1ca..331fa474d7c86884dc77b85dc99f358e1536fc94 100644 (file)
@@ -1,6 +1,6 @@
 # Perltidy Change Log
 
-## 2024 09 03 xx
+## 2024 09 03.01
 
     - Added parameter --qw-as-function, or -qwaf, discussed in git #164.
     When this parameter is set, a qw list which begins with 'qw(' is
index c288b6e6e13723bd5ede0426e63b9c8df24f1f3f..ab1ed241a2e68a2a4c5a02e8275cd1dbf12d43db 100755 (executable)
@@ -3802,8 +3802,6 @@ Here is an example.
         "09" => 30, "10" => 31, "11" => 30, "12" => 31
     );
 
-=back
-
 =item B<-qwaf>,  B<--qw-as-function>
 
 This option tells perltidy to format a B<qw> list which is delimited with
@@ -3845,12 +3843,20 @@ before the paren.
 If the option B<--space-function-paren> is employed, it is ignored for
 these special function calls because it would deactivate them.
 
+=item *
+Otherwise the various formatting control flags operate on these lists the same
+as for other comma-separated lists. In particular, note that if
+B<--break-at-old-comma-breakpoints>, or B<-boc>, is set, then the old line
+break locations will be retained.
+
 =item *
 Before using this option for the first time, it is a good idea to scan the code
 and decide if any lists have a special order which should be retained.  This
-can be accomplished for example by changing the quote delimiter characters to
-something other than parens, or by inserting a blank line as discussed
-at the start of this section.
+can be accomplished for example by changing the quote delimiters to something
+other than parens, or by inserting a blank line as discussed at the start of
+this section.
+
+=back
 
 =back
 
@@ -7005,7 +7011,7 @@ The perltidy binary uses the Perl::Tidy module and is installed when that module
 
 =head1 VERSION
 
-This man page documents perltidy version 20240903
+This man page documents perltidy version 20240903.01
 
 =head1 BUG REPORTS
 
index b82d91319572af89de7469697705654caf1def57..87ffcf9cf8c4c49f9ae51ed3fa2c3251581d56c0 100644 (file)
@@ -1,5 +1,25 @@
 <h1>Perltidy Change Log</h1>
 
+<h2>2024 09 03.01</h2>
+
+<pre><code>- Added parameter --qw-as-function, or -qwaf, discussed in git #164.
+When this parameter is set, a qw list which begins with 'qw(' is
+formatted as if it were a function call with call args being a list
+of comma-separated quoted items. For example, given this input:
+
+@fields = qw( $st_dev      $st_ino    $st_mode $st_nlink   $st_uid
+  $st_gid $st_rdev    $st_size $st_atime   $st_mtime  $st_ctime
+  $st_blksize $st_blocks);
+
+# perltidy -qwaf
+@fields = qw(
+    $st_dev   $st_ino   $st_mode  $st_nlink
+    $st_uid   $st_gid   $st_rdev  $st_size
+    $st_atime $st_mtime $st_ctime $st_blksize
+    $st_blocks
+);
+</code></pre>
+
 <h2>2024 09 03</h2>
 
 <pre><code>- Add partial support for Syntax::Operator::In and Syntax::Keyword::Match
index f2e4b572c56879967679b52a31a5a4546f380afc..5da3a95617c3320c7103f081acd0c9053700b7d3 100644 (file)
 
 <h1 id="VERSION">VERSION</h1>
 
-<p>This man page documents Perl::Tidy version 20240903</p>
+<p>This man page documents Perl::Tidy version 20240903.01</p>
 
 <h1 id="LICENSE">LICENSE</h1>
 
index 59587263712f0d01df55ddb2c77b7ba585820a66..149ef4f166f4f79758d5bc43d9e90f272d93a7cc 100644 (file)
 
 <p>If formatted in this way, the program will not run (at least with recent versions of perl) because the $x is taken to be a filehandle and / is assumed to start a quote. In a complex program, there might happen to be a / which terminates the multiline quote without a syntax error, allowing the program to run, but not as intended.</p>
 
-<p>Related issues arise with other binary operator symbols, such as + and -, and in older versions of perl there could be problems with ternary operators. So to avoid changing program behavior, perltidy has the simple rule that whitespace around possible filehandles is left unchanged. Likewise, whitespace around barewords is left unchanged. The reason is that if the barewords are defined in other modules, or in code that has not even been written yet, perltidy will not have seen their prototypes and must treat them cautiously.</p>
+<p>Related issues arise with other binary operator symbols, such as + and -, and in older versions of perl there could be problems with ternary operators. So to avoid changing program behavior, perltidy has the simple rule that whitespace around possible filehandles is left unchanged. Likewise, whitespace around unknown barewords is left unchanged. The reason is that if the barewords are defined in other modules, or in code that has not even been written yet, perltidy will not have seen their prototypes and must treat them cautiously.</p>
 
 <p>In perltidy this is implemented in the tokenizer by marking token following a <b>print</b> keyword as a special type <b>Z</b>. When formatting is being done, whitespace following this token type is generally left unchanged as a precaution against changing program behavior. This is excessively conservative but simple and easy to implement. Keywords which are treated similarly to <b>print</b> include <b>printf</b>, <b>sort</b>, <b>exec</b>, <b>system</b>. Changes in spacing around parameters following these keywords may have to be made manually. For example, the space, or lack of space, after the parameter $foo in the following line will be unchanged in formatting.</p>
 
         &quot;09&quot; =&gt; 30, &quot;10&quot; =&gt; 31, &quot;11&quot; =&gt; 30, &quot;12&quot; =&gt; 31
     );</code></pre>
 
+</dd>
+<dt id="qwaf---qw-as-function"><b>-qwaf</b>, <b>--qw-as-function</b></dt>
+<dd>
+
+<p>This option tells perltidy to format a <b>qw</b> list which is delimited with parentheses as if it were a function call whose call args are a list of quoted items. Normally, a <b>qw</b> list is output verbatim except for an adjustment of leading whitespace to indicate the indentation level. For example, here is an example of the default formatting of a poorly formatted <b>qw</b> list:</p>
+
+<pre><code>    # perltidy
+    @fields = qw( $st_dev          $st_ino    $st_mode $st_nlink   $st_uid
+      $st_gid $st_rdev    $st_size $st_atime   $st_mtime  $st_ctime
+      $st_blksize $st_blocks);</code></pre>
+
+<p>If we format with <b>-qwaf</b> then the result will be:</p>
+
+<pre><code>    # perltidy -qwaf
+    @fields = qw(
+        $st_dev   $st_ino   $st_mode  $st_nlink
+        $st_uid   $st_gid   $st_rdev  $st_size
+        $st_atime $st_mtime $st_ctime $st_blksize
+        $st_blocks
+    );</code></pre>
+
+<p>The way this works is that just before formatting begins, the tokens of the <b>qw</b> text are replaced with the tokens of an equivalent function call with a comma-separated list of quoted items as call args. Then it is formatted like any other list. Special comma tokens are employed which have no display text, so when the code is eventually displayed it remains a valid <b>qw</b> quote.</p>
+
+<p>Some things to note are:</p>
+
+<ul>
+
+<li><p>This only works for <b>qw</b> quotes which begin with <b>qw(</b>, with no space before the paren.</p>
+
+</li>
+<li><p>If the option <b>--space-function-paren</b> is employed, it is ignored for these special function calls because it would deactivate them.</p>
+
+</li>
+<li><p>Otherwise the various formatting control flags operate on these lists the same as for other comma-separated lists. In particular, note that if <b>--break-at-old-comma-breakpoints</b>, or <b>-boc</b>, is set, then the old line break locations will be retained.</p>
+
+</li>
+<li><p>Before using this option for the first time, it is a good idea to scan the code and decide if any lists have a special order which should be retained. This can be accomplished for example by changing the quote delimiters to something other than parens, or by inserting a blank line as discussed at the start of this section.</p>
+
+</li>
+</ul>
+
 </dd>
 </dl>
 
 
 <h1 id="VERSION">VERSION</h1>
 
-<p>This man page documents perltidy version 20240903</p>
+<p>This man page documents perltidy version 20240903.01</p>
 
 <h1 id="BUG-REPORTS">BUG REPORTS</h1>
 
index 1412f28261c069210360e69af8fd6b55193cfb24..624ab397274389f96c6e038a674ed0a87fc63647 100644 (file)
@@ -135,7 +135,7 @@ BEGIN {
     # then the Release version must be bumped, and it is probably past time for
     # a release anyway.
 
-    $VERSION = '20240903';
+    $VERSION = '20240903.01';
 } ## end BEGIN
 
 sub DESTROY {
index 2a8de7b8829e24bd889384582944af10acee0c0a..85fe35c687f0f33c40c3b89c4ec42fb9c6f705c7 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 20240903
+This man page documents Perl::Tidy version 20240903.01
 
 =head1 LICENSE
 
index 18dc0d2fa2e4dc5bf6cd9dd96d3ada3d6509d7bd..d0436d372897055b1368a14cd5ffd13329204257 100644 (file)
@@ -8,7 +8,7 @@ package Perl::Tidy::Debugger;
 use strict;
 use warnings;
 use English qw( -no_match_vars );
-our $VERSION = '20240903';
+our $VERSION = '20240903.01';
 
 use constant EMPTY_STRING => q{};
 use constant SPACE        => q{ };
index 5b1252973161742ea1adff5aa43b87cb6df8a5a4..d6a6ffee4722a4b825ec760a8fa2fca45099712f 100644 (file)
@@ -18,7 +18,7 @@ package Perl::Tidy::Diagnostics;
 use strict;
 use warnings;
 use English qw( -no_match_vars );
-our $VERSION = '20240903';
+our $VERSION = '20240903.01';
 
 use constant EMPTY_STRING => q{};
 
index 499608cb6efc2dd294355a7bb19b2c5b587d0b31..5cddbfca8ff2ffdfab8e3938316a98f9c7e20098 100644 (file)
@@ -16,7 +16,7 @@
 package Perl::Tidy::FileWriter;
 use strict;
 use warnings;
-our $VERSION = '20240903';
+our $VERSION = '20240903.01';
 
 use constant DEVEL_MODE   => 0;
 use constant EMPTY_STRING => q{};
index f7b56462852731240878c7b6d7d16b5325df616b..b54db33331558a0271341f361c43920ac8c7a341 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 = '20240903';
+our $VERSION = '20240903.01';
 
 # The Tokenizer will be loaded with the Formatter
 ##use Perl::Tidy::Tokenizer;    # for is_keyword()
index 0b1b5726c945988266423af4afc2023a82306255..8ce6682b3b9f25ba94e0fad988dc2f7a32b77e00 100644 (file)
@@ -7,7 +7,7 @@
 package Perl::Tidy::HtmlWriter;
 use strict;
 use warnings;
-our $VERSION = '20240903';
+our $VERSION = '20240903.01';
 
 use Carp;
 use English qw( -no_match_vars );
index d3aefd47d0a0c263775e0fe57d2c528131a38192..172a88e66d0749dbb3114271c9d1afa8a7154e77 100644 (file)
@@ -10,7 +10,7 @@ package Perl::Tidy::IOScalar;
 use strict;
 use warnings;
 use Carp;
-our $VERSION = '20240903';
+our $VERSION = '20240903.01';
 
 use constant DEVEL_MODE   => 0;
 use constant EMPTY_STRING => q{};
index 89a4ec3b862fc65fb863efb4877b08dc368f233d..f92a69d7c655408cd53426b425b6570d8013484a 100644 (file)
@@ -14,7 +14,7 @@ package Perl::Tidy::IOScalarArray;
 use strict;
 use warnings;
 use Carp;
-our $VERSION = '20240903';
+our $VERSION = '20240903.01';
 
 use constant DEVEL_MODE => 0;
 
index 0a9a6531e0c474092a22f504a947527b435f4255..2a71a65a12aa140c668428cc727ade9e32bdb5f8 100644 (file)
@@ -9,7 +9,7 @@ package Perl::Tidy::IndentationItem;
 use strict;
 use warnings;
 
-our $VERSION = '20240903';
+our $VERSION = '20240903.01';
 
 BEGIN {
 
index 0db8e8d634a0d30b7ce15898a0f13cbbee25c384..fed6aaa17963f7bf6dad25761b584dd7d91c66ce 100644 (file)
@@ -8,7 +8,7 @@
 package Perl::Tidy::Logger;
 use strict;
 use warnings;
-our $VERSION = '20240903';
+our $VERSION = '20240903.01';
 use Carp;
 use English qw( -no_match_vars );
 
index 24a8fb5dc8935f47d0cc44bb7ad0131ee60663aa..f1e738df927a2c607234f4b3a1d5bda40edaf144 100644 (file)
@@ -33,7 +33,7 @@ use strict;
 use warnings;
 use English qw( -no_match_vars );
 
-our $VERSION = '20240903';
+our $VERSION = '20240903.01';
 
 use Carp;
 
index 93febef038f8b756d0e616b3d267205b96e2464b..b22ba5e7c3a769cc2f25efd793e05d017e21c8c4 100644 (file)
@@ -5,7 +5,7 @@ use Carp;
 
 { #<<< A non-indenting brace to contain all lexical variables
 
-our $VERSION = '20240903';
+our $VERSION = '20240903.01';
 use English qw( -no_match_vars );
 use Scalar::Util 'refaddr';    # perl 5.8.1 and later
 use Perl::Tidy::VerticalAligner::Alignment;
index 92a4528d3876862d6afadc81900c266bef14884d..0a99b053110bbbb72c89e8361e67f46efaef27d3 100644 (file)
@@ -9,7 +9,7 @@ package Perl::Tidy::VerticalAligner::Alignment;
 use strict;
 use warnings;
 
-our $VERSION = '20240903';
+our $VERSION = '20240903.01';
 
 sub new {
     my ( $class, $rarg ) = @_;
index 6923520b4551b397f139345dcfab5d106ae85dc7..f03ad6574d10d7abe020de0f3aa5005ee2e03127 100644 (file)
@@ -10,7 +10,7 @@ package Perl::Tidy::VerticalAligner::Line;
 use strict;
 use warnings;
 
-our $VERSION = '20240903';
+our $VERSION = '20240903.01';
 use English qw( -no_match_vars );
 
 sub AUTOLOAD {