]> git.donarmstrong.com Git - perltidy.git/commitdiff
bump version to 20240202.03 20240202.03
authorSteve Hancock <perltidy@users.sourceforge.net>
Mon, 25 Mar 2024 23:00:49 +0000 (16:00 -0700)
committerSteve Hancock <perltidy@users.sourceforge.net>
Mon, 25 Mar 2024 23:00:49 +0000 (16:00 -0700)
21 files changed:
CHANGES.md
bin/perltidy
dev-bin/run_convergence_tests.pl.expect
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 de24787def3eccf53241427201b664fefaa33624..2ebb9783d323984b9bd753a6707a3ba30ae131be 100644 (file)
@@ -1,6 +1,6 @@
 # Perltidy Change Log
 
-## 2024 02 02.02
+## 2024 02 02.03
 
     - Add option --valign-wide-equals, or -vwe, for issue git #135.
       Setting this parameter causes the following assignment operators
@@ -8,7 +8,7 @@
          = **= += *= &= <<= &&= -= /= |= >>= ||= //= .= %= ^= x=
 
       to be aligned vertically with the ending = all aligned. For example,
-      here is the default formatting of a snippet from perltidy itself:
+      here is the default formatting of a snippet of code:
 
             $str .= SPACE x $total_pad_count;
             $str_len += $total_pad_count;
             $str .= $rfields->[$j];
             $str_len += $rfield_lengths->[$j];
 
-      And here is the same code formatted with B<-vme>:
+      And here is the same code formatted with -vwe:
 
-            # perltidy -vme
+            # perltidy -vwe
             $str             .= SPACE x $total_pad_count;
             $str_len         += $total_pad_count;
             $total_pad_count  = 0;
             $str             .= $rfields->[$j];
             $str_len         += $rfield_lengths->[$j];
 
-      This option is off by default to avoid changing existing formatting.
+      This option currently is off by default to avoid changing existing formatting.
 
     - In the option --dump-block-summary, the number of sub arguments indicated
       for each sub now includes any leading object variable passed with
index ca7c2dc8da487a84016c00d36eb31da35a79e78a..f861a85a5125155974811269ad1747016546a1c1 100755 (executable)
@@ -6475,7 +6475,7 @@ The perltidy binary uses the Perl::Tidy module and is installed when that module
 
 =head1 VERSION
 
-This man page documents perltidy version 20240202.02
+This man page documents perltidy version 20240202.03
 
 =head1 BUG REPORTS
 
index a8f7f127f574eaa6b25dc8e8aa1eb82ee4f485d1..b697fe65567bfe9c8639b790a3272d7146822ff6 100644 (file)
@@ -1697,15 +1697,13 @@ my @boolfunc =
         $titles
              .= ( $timestamp
                   ? format_date($timestamp)
-                  : "" )
-             . ";";
+                  : "" ) . ";";
 
         # S2
         $titles
              .= ( $timestamp
                   ? format_date($timestamp)
-                  : "" )
-             . ";";
+                  : "" ) . ";";
 
 ==> b1049 <==
             # s1
@@ -1814,7 +1812,7 @@ my @boolfunc =
 ==> b1055 <==
       # S1
       my @tests =
-        ( [$x],
+        (   [$x],
             [ [ [
 "aa",
 "b",
@@ -1828,7 +1826,7 @@ my @boolfunc =
 
       # S2
       my @tests =
-        ( [$x],
+        (   [$x],
             [ [ [
 "aa",
 "b",
@@ -3382,7 +3380,7 @@ is_deeply(
 {
         my %tests = (
                 -8589934592 =>
-                    [ 9,
+                    [   9,
                         -203,
 qr/Oct \d+ .* 1697$/
                     ],
@@ -3396,7 +3394,7 @@ qr/Dec \d+ .* 1969$/
 {
         my %tests = (
                 -8589934592 =>
-                    [ 9,
+                    [   9,
                         -203,
 qr/Oct \d+ .* 1697$/
                     ],
index 1cfaee633eab68fca5ba4374cd63d6d5e0f87aaa..3a92e8857e01a7999a8e6b720f34a749d985c630 100644 (file)
@@ -1,8 +1,53 @@
 <h1>Perltidy Change Log</h1>
 
-<h2>2024 02 02.02</h2>
-
-<pre><code>- The option --valign-signed-numbers, or -vsn is now the default. It
+<h2>2024 02 02.03</h2>
+
+<pre><code>- Add option --valign-wide-equals, or -vwe, for issue git #135.
+  Setting this parameter causes the following assignment operators
+
+     = **= += *= &amp;= &lt;&lt;= &amp;&amp;= -= /= |= &gt;&gt;= ||= //= .= %= ^= x=
+
+  to be aligned vertically with the ending = all aligned. For example,
+  here is the default formatting of a snippet of code:
+
+        $str .= SPACE x $total_pad_count;
+        $str_len += $total_pad_count;
+        $total_pad_count = 0;
+        $str .= $rfields-&gt;[$j];
+        $str_len += $rfield_lengths-&gt;[$j];
+
+  And here is the same code formatted with -vwe:
+
+        # perltidy -vwe
+        $str             .= SPACE x $total_pad_count;
+        $str_len         += $total_pad_count;
+        $total_pad_count  = 0;
+        $str             .= $rfields-&gt;[$j];
+        $str_len         += $rfield_lengths-&gt;[$j];
+
+  This option currently is off by default to avoid changing existing formatting.
+
+- In the option --dump-block-summary, the number of sub arguments indicated
+  for each sub now includes any leading object variable passed with
+  an arrow-operator call.  Previously the count would have been decreased
+  by one in this case. This change is needed for compatibility with future
+  updates.
+
+- 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
+  with the parameter setting -nwls='**='.
+
+- The option --file-size-order, or -fso is now the default. When
+  perltidy is given a list of multiple filenames to process, they
+  are sorted by size and processed in order of increasing size.
+  This can significantly reduce memory usage by Perl.  This
+  option has always been used in testing, where typically several
+  jobs each operating on thousands of filenames are running at the
+  same time and competing for system resources.  If this option
+  is not wanted for some reason, it can be deactivated with -nfso.
+
+- The option --valign-signed-numbers, or -vsn is now the default. It
   was introduced in the previous release has been found to significantly
   improve the overall appearance of columns of signed and unsigned
   numbers.  It will change formatting slightly in scripts with columns
index a2431bebec2349af1f7cadf4623f5e89e74da000..8d90e8476ba28a7dc857e61c0ee6b390535bc2fd 100644 (file)
 
 <h1 id="VERSION">VERSION</h1>
 
-<p>This man page documents Perl::Tidy version 20240202.02</p>
+<p>This man page documents Perl::Tidy version 20240202.03</p>
 
 <h1 id="LICENSE">LICENSE</h1>
 
index 2ce87b966de3cd0296db9cbd089cebb1968f905a..2ed0d8467b6e63311ba357355489a5ab4ea18741 100644 (file)
 </li>
 </ul>
 
+</dd>
+<dt id="Aligning-assignment-operators-with---valign-wide-equals-or--vwe"><b>Aligning assignment operators with --valign-wide-equals or -vwe</b></dt>
+<dd>
+
+<p>The following assignment operators are aligned independently by default:</p>
+
+<pre><code>      = **= += *= &amp;= &lt;&lt;= &amp;&amp;= -= /= |= &gt;&gt;= ||= //= .= %= ^= x=</code></pre>
+
+<p>Setting <b>--valign-wide-equals</b>, or <b>-vwe</b>, causes them to be vertically alligned together with the trailing <b>=</b> all aligned. For example, here is the default formatting for some code with several of these operators:</p>
+
+<pre><code>            $str .= SPACE x $total_pad_count;
+            $str_len += $total_pad_count;
+            $total_pad_count = 0;
+            $str .= $rfields-&gt;[$j];
+            $str_len += $rfield_lengths-&gt;[$j];</code></pre>
+
+<p>And here is the same code formatted with <b>-vme</b>:</p>
+
+<pre><code>            # perltidy -vme
+            $str             .= SPACE x $total_pad_count;
+            $str_len         += $total_pad_count;
+            $total_pad_count  = 0;
+            $str             .= $rfields-&gt;[$j];
+            $str_len         += $rfield_lengths-&gt;[$j];</code></pre>
+
+<p>This option was added for issue git #135 and can improve readability, but it is off by default to avoid changing existing formatting.</p>
+
 </dd>
 </dl>
 
 
 <p><b>--no-timestamp</b> or <b>-nts</b> will eliminate any time stamps in output files to prevent differences in dates from causing test installation scripts to fail. There are just a couple of places where timestamps normally occur. One is in the headers of html files, and another is when the <b>-cscw</b> option is selected. The default is to allow timestamps (<b>--timestamp</b> or <b>-ts</b>).</p>
 
-<p><b>--file-size-order</b> or <b>-fso</b> will cause files to be processed in order of increasing size, when multiple files are being processed. This is useful during program development, when large numbers of files with varying sizes are processed, because it can reduce virtual memory usage.</p>
+<p><b>--file-size-order</b> or <b>-fso</b> will cause files to be processed in order of increasing size, when multiple files are being processed. This is particularly useful during program development, when large numbers of files with varying sizes are processed, because it can reduce virtual memory usage. This is the default and can be deactivated with <b>-nfso</b>.</p>
 
 <p><b>--maximum-file-size-mb=n</b> or <b>-maxfs=n</b> specifies the maximum file size in megabytes that perltidy will attempt to format. This parameter is provided to avoid causing system problems by accidentally attempting to format an extremely large data file. Most perl scripts are less than about 2 MB in size. The integer <b>n</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</p>
 
 
 <p>This feature was developed to help identify complex sections of code as an aid in refactoring. The McCabe complexity measure follows the definition used by Perl::Critic. By default the table contains these values for subroutines, but the user may request them for any or all blocks of code or packages. For blocks which are loops nested within loops, a postfix &#39;+&#39; to the <code>type</code> is added to indicate possible code complexity. Although the table does not otherwise indicate which blocks are nested in other blocks, this can be determined by computing and comparing the block ending line numbers.</p>
 
-<p>For subroutines, the number of call arguments (args) is listed in parentheses in the <code>type</code> column. For example, <code>sub(9)</code> indicates a sub with 9 args. Subroutines whose arg count cannot easily be determined are indicated as <code>sub(*)</code>. The count does not include a leading variable named <b>$self</b> or <b>$class</b>.</p>
+<p>For subroutines, the number of call arguments (args) is listed in parentheses in the <code>type</code> column. For example, <code>sub(9)</code> indicates a sub with 9 args. Subroutines whose arg count cannot easily be determined are indicated as <code>sub(*)</code>. The count includes any leading object passed in a method call (such as <b>$self</b>).</p>
 
 <p>By default the table lists subroutines with more than 20 <code>code_lines</code>, but this can be changed with the following two parameters:</p>
 
 
 <h1 id="VERSION">VERSION</h1>
 
-<p>This man page documents perltidy version 20240202.02</p>
+<p>This man page documents perltidy version 20240202.03</p>
 
 <h1 id="BUG-REPORTS">BUG REPORTS</h1>
 
index cafa7b8b5859227ce6d907f8002fc0ad0c1550fb..3264b535196eb39c6c74515ae0a2dc916c38e9eb 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 = '20240202.02';
+    $VERSION = '20240202.03';
 } ## end BEGIN
 
 sub DESTROY {
index 19c7c81abe75f059996b93af123f4aa5b7013978..98fc5cafeeb396b287f83ce407ca40ae583cf48e 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 20240202.02
+This man page documents Perl::Tidy version 20240202.03
 
 =head1 LICENSE
 
index 9f245bac528e0a58059a323c8418cb296d302b90..d129f81a3c37845976b2044223b40675a0911106 100644 (file)
@@ -8,7 +8,7 @@ package Perl::Tidy::Debugger;
 use strict;
 use warnings;
 use English qw( -no_match_vars );
-our $VERSION = '20240202.02';
+our $VERSION = '20240202.03';
 
 use constant EMPTY_STRING => q{};
 use constant SPACE        => q{ };
index c1bdc27bada535ae9a0b74e56c537582619ff8ef..872b154dd00ea41b0d2872fcfcb706159804ccc6 100644 (file)
@@ -18,7 +18,7 @@ package Perl::Tidy::Diagnostics;
 use strict;
 use warnings;
 use English qw( -no_match_vars );
-our $VERSION = '20240202.02';
+our $VERSION = '20240202.03';
 
 use constant EMPTY_STRING => q{};
 
index 92a69aad28cab332b21b7d2f0e598d233c488403..0e925db169dc12104cad8d7586619bf6b0e5eb89 100644 (file)
@@ -16,7 +16,7 @@
 package Perl::Tidy::FileWriter;
 use strict;
 use warnings;
-our $VERSION = '20240202.02';
+our $VERSION = '20240202.03';
 
 use constant DEVEL_MODE   => 0;
 use constant EMPTY_STRING => q{};
index 2bc654d088d14c955982274787955b928f044232..e62d612507499eb8e9ad2b776198d680e82fc1cf 100644 (file)
@@ -75,7 +75,7 @@ use constant SPACE        => 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 = '20240202.02';
+our $VERSION = '20240202.03';
 
 # The Tokenizer will be loaded with the Formatter
 ##use Perl::Tidy::Tokenizer;    # for is_keyword()
@@ -2322,8 +2322,7 @@ sub initialize_old_breakpoint_controls {
         if (@conflicts) {
             my $msg = join( "\n  ",
 " Conflict: These conflicts with --ignore-old-breakponts (-iob) will be turned off:",
-                @conflicts )
-              . "\n";
+                @conflicts ) . "\n";
             Warn($msg);
         }
 
index af1e5194b190beaf9d42a2cc04d851383cf242e8..c19d26020ae337e81be1c4d12a51ce63469696c1 100644 (file)
@@ -7,7 +7,7 @@
 package Perl::Tidy::HtmlWriter;
 use strict;
 use warnings;
-our $VERSION = '20240202.02';
+our $VERSION = '20240202.03';
 
 use Carp;
 use English qw( -no_match_vars );
index 9006e755f4b40ab6b9a794f1fc49f64fcbc839d4..2da04ed5bd08a0f1d1b6e9a1392df58826f8b1bf 100644 (file)
@@ -10,7 +10,7 @@ package Perl::Tidy::IOScalar;
 use strict;
 use warnings;
 use Carp;
-our $VERSION = '20240202.02';
+our $VERSION = '20240202.03';
 
 use constant DEVEL_MODE   => 0;
 use constant EMPTY_STRING => q{};
index 418ec88fde1d84efeb17fb8e4ebcc2302c5810bf..8673452349c8ff326bab22ec8cddd1f898e4f48f 100644 (file)
@@ -14,7 +14,7 @@ package Perl::Tidy::IOScalarArray;
 use strict;
 use warnings;
 use Carp;
-our $VERSION = '20240202.02';
+our $VERSION = '20240202.03';
 
 use constant DEVEL_MODE => 0;
 
index c9a95069d5b742e0353e73487664140e7e962177..9fbabbabad58d8a2b07c0a93255b8dc8a42a2690 100644 (file)
@@ -9,7 +9,7 @@ package Perl::Tidy::IndentationItem;
 use strict;
 use warnings;
 
-our $VERSION = '20240202.02';
+our $VERSION = '20240202.03';
 
 BEGIN {
 
index 8759498889bfbb97624714d9723fb4888209579e..d5cd16eee44652dbc1a93a22af47bf81aaf2656d 100644 (file)
@@ -8,7 +8,7 @@
 package Perl::Tidy::Logger;
 use strict;
 use warnings;
-our $VERSION = '20240202.02';
+our $VERSION = '20240202.03';
 use Carp;
 use English qw( -no_match_vars );
 
index 1da0e5c91e24fa40276f5bbcf117b8491f774b8f..809cd2c41e1bab590cc658c786501fd30a46152f 100644 (file)
@@ -33,7 +33,7 @@ use strict;
 use warnings;
 use English qw( -no_match_vars );
 
-our $VERSION = '20240202.02';
+our $VERSION = '20240202.03';
 
 use Carp;
 
index 493a07768d3821f36c665f858fb9c6c65bad19a9..8efa75e8881df27316976a70fad170cf51cdf6ec 100644 (file)
@@ -5,7 +5,7 @@ use Carp;
 
 { #<<< A non-indenting brace to contain all lexical variables
 
-our $VERSION = '20240202.02';
+our $VERSION = '20240202.03';
 use English qw( -no_match_vars );
 use Perl::Tidy::VerticalAligner::Alignment;
 use Perl::Tidy::VerticalAligner::Line;
index a88cc800f66a132e8c0cead2e482ebbc5fd9b8f2..f15ad97b1bc0d9c95878a8bbaef2c4ff869335f5 100644 (file)
@@ -9,7 +9,7 @@ package Perl::Tidy::VerticalAligner::Alignment;
 use strict;
 use warnings;
 
-our $VERSION = '20240202.02';
+our $VERSION = '20240202.03';
 
 sub new {
     my ( $class, $rarg ) = @_;
index fc29e0859636bb9d94ec8f185196ae5eb2674964..480b7b4461d4ec9a722245aa8a74df4ca34ee318 100644 (file)
@@ -10,7 +10,7 @@ package Perl::Tidy::VerticalAligner::Line;
 use strict;
 use warnings;
 
-our $VERSION = '20240202.02';
+our $VERSION = '20240202.03';
 use English qw( -no_match_vars );
 
 sub AUTOLOAD {