From: Steve Hancock Date: Mon, 25 Mar 2024 23:00:49 +0000 (-0700) Subject: bump version to 20240202.03 X-Git-Tag: 20240202.03^0 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=44905e66129bd4d5995b3a00c20406e2901c710c;p=perltidy.git bump version to 20240202.03 --- diff --git a/CHANGES.md b/CHANGES.md index de24787d..2ebb9783 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -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; @@ -16,16 +16,16 @@ $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 diff --git a/bin/perltidy b/bin/perltidy index ca7c2dc8..f861a85a 100755 --- a/bin/perltidy +++ b/bin/perltidy @@ -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 diff --git a/dev-bin/run_convergence_tests.pl.expect b/dev-bin/run_convergence_tests.pl.expect index a8f7f127..b697fe65 100644 --- a/dev-bin/run_convergence_tests.pl.expect +++ b/dev-bin/run_convergence_tests.pl.expect @@ -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$/ ], diff --git a/docs/ChangeLog.html b/docs/ChangeLog.html index 1cfaee63..3a92e885 100644 --- a/docs/ChangeLog.html +++ b/docs/ChangeLog.html @@ -1,8 +1,53 @@

Perltidy Change Log

-

2024 02 02.02

- -
- The option --valign-signed-numbers, or -vsn is now the default. It
+

2024 02 02.03

+ +
- Add option --valign-wide-equals, or -vwe, for issue git #135.
+  Setting this parameter causes the following assignment operators
+
+     = **= += *= &= <<= &&= -= /= |= >>= ||= //= .= %= ^= 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->[$j];
+        $str_len += $rfield_lengths->[$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->[$j];
+        $str_len         += $rfield_lengths->[$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
diff --git a/docs/Tidy.html b/docs/Tidy.html
index a2431beb..8d90e847 100644
--- a/docs/Tidy.html
+++ b/docs/Tidy.html
@@ -399,7 +399,7 @@
 
 

VERSION

-

This man page documents Perl::Tidy version 20240202.02

+

This man page documents Perl::Tidy version 20240202.03

LICENSE

diff --git a/docs/perltidy.html b/docs/perltidy.html index 2ce87b96..2ed0d846 100644 --- a/docs/perltidy.html +++ b/docs/perltidy.html @@ -4170,6 +4170,33 @@ + +
Aligning assignment operators with --valign-wide-equals or -vwe
+
+ +

The following assignment operators are aligned independently by default:

+ +
      = **= += *= &= <<= &&= -= /= |= >>= ||= //= .= %= ^= x=
+ +

Setting --valign-wide-equals, or -vwe, causes them to be vertically alligned together with the trailing = all aligned. For example, here is the default formatting for some code with several of these operators:

+ +
            $str .= SPACE x $total_pad_count;
+            $str_len += $total_pad_count;
+            $total_pad_count = 0;
+            $str .= $rfields->[$j];
+            $str_len += $rfield_lengths->[$j];
+ +

And here is the same code formatted with -vme:

+ +
            # perltidy -vme
+            $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 was added for issue git #135 and can improve readability, but it is off by default to avoid changing existing formatting.

+
@@ -4438,7 +4465,7 @@

--no-timestamp or -nts 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 -cscw option is selected. The default is to allow timestamps (--timestamp or -ts).

-

--file-size-order or -fso 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.

+

--file-size-order or -fso 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 -nfso.

--maximum-file-size-mb=n or -maxfs=n 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 n 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

@@ -4517,7 +4544,7 @@

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 '+' to the type 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.

-

For subroutines, the number of call arguments (args) is listed in parentheses in the type column. For example, sub(9) indicates a sub with 9 args. Subroutines whose arg count cannot easily be determined are indicated as sub(*). The count does not include a leading variable named $self or $class.

+

For subroutines, the number of call arguments (args) is listed in parentheses in the type column. For example, sub(9) indicates a sub with 9 args. Subroutines whose arg count cannot easily be determined are indicated as sub(*). The count includes any leading object passed in a method call (such as $self).

By default the table lists subroutines with more than 20 code_lines, but this can be changed with the following two parameters:

@@ -5032,7 +5059,7 @@

VERSION

-

This man page documents perltidy version 20240202.02

+

This man page documents perltidy version 20240202.03

BUG REPORTS

diff --git a/lib/Perl/Tidy.pm b/lib/Perl/Tidy.pm index cafa7b8b..3264b535 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 = '20240202.02'; + $VERSION = '20240202.03'; } ## end BEGIN sub DESTROY { diff --git a/lib/Perl/Tidy.pod b/lib/Perl/Tidy.pod index 19c7c81a..98fc5caf 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 20240202.02 +This man page documents Perl::Tidy version 20240202.03 =head1 LICENSE diff --git a/lib/Perl/Tidy/Debugger.pm b/lib/Perl/Tidy/Debugger.pm index 9f245bac..d129f81a 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 = '20240202.02'; +our $VERSION = '20240202.03'; use constant EMPTY_STRING => q{}; use constant SPACE => q{ }; diff --git a/lib/Perl/Tidy/Diagnostics.pm b/lib/Perl/Tidy/Diagnostics.pm index c1bdc27b..872b154d 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 = '20240202.02'; +our $VERSION = '20240202.03'; use constant EMPTY_STRING => q{}; diff --git a/lib/Perl/Tidy/FileWriter.pm b/lib/Perl/Tidy/FileWriter.pm index 92a69aad..0e925db1 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 = '20240202.02'; +our $VERSION = '20240202.03'; 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 2bc654d0..e62d6125 100644 --- a/lib/Perl/Tidy/Formatter.pm +++ b/lib/Perl/Tidy/Formatter.pm @@ -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); } diff --git a/lib/Perl/Tidy/HtmlWriter.pm b/lib/Perl/Tidy/HtmlWriter.pm index af1e5194..c19d2602 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 = '20240202.02'; +our $VERSION = '20240202.03'; use Carp; use English qw( -no_match_vars ); diff --git a/lib/Perl/Tidy/IOScalar.pm b/lib/Perl/Tidy/IOScalar.pm index 9006e755..2da04ed5 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 = '20240202.02'; +our $VERSION = '20240202.03'; 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 418ec88f..86734523 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 = '20240202.02'; +our $VERSION = '20240202.03'; use constant DEVEL_MODE => 0; diff --git a/lib/Perl/Tidy/IndentationItem.pm b/lib/Perl/Tidy/IndentationItem.pm index c9a95069..9fbabbab 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 = '20240202.02'; +our $VERSION = '20240202.03'; BEGIN { diff --git a/lib/Perl/Tidy/Logger.pm b/lib/Perl/Tidy/Logger.pm index 87594988..d5cd16ee 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 = '20240202.02'; +our $VERSION = '20240202.03'; use Carp; use English qw( -no_match_vars ); diff --git a/lib/Perl/Tidy/Tokenizer.pm b/lib/Perl/Tidy/Tokenizer.pm index 1da0e5c9..809cd2c4 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 = '20240202.02'; +our $VERSION = '20240202.03'; use Carp; diff --git a/lib/Perl/Tidy/VerticalAligner.pm b/lib/Perl/Tidy/VerticalAligner.pm index 493a0776..8efa75e8 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 = '20240202.02'; +our $VERSION = '20240202.03'; use English qw( -no_match_vars ); 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 a88cc800..f15ad97b 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 = '20240202.02'; +our $VERSION = '20240202.03'; sub new { my ( $class, $rarg ) = @_; diff --git a/lib/Perl/Tidy/VerticalAligner/Line.pm b/lib/Perl/Tidy/VerticalAligner/Line.pm index fc29e085..480b7b44 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 = '20240202.02'; +our $VERSION = '20240202.03'; use English qw( -no_match_vars ); sub AUTOLOAD {