# Perltidy Change Log
-## 2022 06 01
+## 2022 06 13
- - Please note the following two significant changes in this distribution:
+ - No significant bugs have been found since the last release but users
+ of programs which call the Perl::Tidy module should note the first
+ item below, which changes a default setting. The main change to
+ existing formatting is the second item below, which adds vertical
+ alignment to 'use' statements.
- The flag --encode-output-strings, or -eos, is now set 'on' by default.
This has no effect on the use of the 'perltidy' binary script, but could
https://github.com/perltidy/perltidy/blob/master/docs/eos_flag.md
- - Add vertical alignment for qw quotes and empty parens in 'use'
+ - Added vertical alignment for qw quotes and empty parens in 'use'
statements (see issue #git 93). This new alignment is 'on' by default
and will change formatting as shown below. If this is not wanted it can
be turned off with the parameter -vxl='q' (--valign-exclude-list='q').
- # old default or -vxl='q'
+ # old default, or -vxl='q'
use Getopt::Long qw(GetOptions);
use Fcntl qw(O_RDONLY O_WRONLY O_EXCL O_CREAT);
use Symbol qw(gensym);
use Symbol qw(gensym);
use Exporter ();
+ - The parameter -kbb (--keep-break-before) now ignores a request to break
+ before an opening token, such as '('. Likewise, -kba (--keep-break-after)
+ now ignores a request to break after a closing token, such as ')'. This
+ change was made to avoid a rare instability discovered in random testing.
+
- Previously, if a -dsc command was used to delete all side comments,
- then any special control comments for non-indenting braces got deleted too.
- Now, these control side comments are retained when -dsc is set unless
- a -nnib (--nonon-indenting-braces) flag is also set to deactivate them.
+ then any special side comments for controlling non-indenting braces got
+ deleted too. Now, these control side comments are retained when -dsc is
+ set unless a -nnib (--nonon-indenting-braces) flag is also set to
+ deactivate them.
- - This version runs 15 to 20 percent faster on large files than the
- previous release due to optimizations made with the help of Devel::NYTProf.
+ - This version runs about 10 percent faster on large files than the previous
+ release due to optimizations made with the help of Devel::NYTProf. Much
+ of the gain came from faster processing of blank tokens and comments.
- This version of perltidy was stress-tested for many cpu hours with
random input parameters. No failures to converge, internal fault checks,
undefined variable references or other irregularities were seen.
-
## 2022 02 17
- A new flag, --encode-output-strings, or -eos, has been added to resolve
'F' matches if 'f' does not.
'w' matches if either 'k' or 'f' match.
'W' matches if 'w' does not.
+ '*' always matches
So for example the the following parameter will keep breaks after opening function call
parens:
perltidy -kba='f('
-B<NOTE>: To match all opening curly braces, and no other opening tokens, please
-prefix the brace it with an asterisk, like this: '*{'. Otherwise a warning
-message will occur. This is necessary to avoid problems while the input scheme
-is being updated and generalized. A single bare curly brace previously matched
-all container tokens, and tentatively still does. Likewise, to match all
-closing curly braces, and no other closing tokens, use '*}'.
+B<NOTE>: A request to break before an opening container, such as B<-kbb='('>,
+will be silently ignored because it can lead to formatting instability.
+Likewise, a request to break after a closing container, such as B<-kba>=')',
+will also be silently ignored.
=item B<-iob>, B<--ignore-old-breakpoints>
=head1 VERSION
-This man page documents perltidy version 20220601
+This man page documents perltidy version 20220613
=head1 BUG REPORTS
<h1>Perltidy Change Log</h1>
-<h2>2022 06 01</h2>
+<h2>2022 06 13</h2>
-<pre><code>- Please note the following two significant changes in this distribution:
+<pre><code>- No significant bugs have been found since the last release but users
+ of programs which call the Perl::Tidy module should note the first
+ item below, which changes a default setting. The main change to
+ existing formatting is the second item below, which adds vertical
+ alignment to 'use' statements.
- The flag --encode-output-strings, or -eos, is now set 'on' by default.
This has no effect on the use of the 'perltidy' binary script, but could
https://github.com/perltidy/perltidy/blob/master/docs/eos_flag.md
-- Add vertical alignment for qw quotes and empty parens in 'use'
+- Added vertical alignment for qw quotes and empty parens in 'use'
statements (see issue #git 93). This new alignment is 'on' by default
and will change formatting as shown below. If this is not wanted it can
be turned off with the parameter -vxl='q' (--valign-exclude-list='q').
- # old default or -vxl='q'
+ # old default, or -vxl='q'
use Getopt::Long qw(GetOptions);
use Fcntl qw(O_RDONLY O_WRONLY O_EXCL O_CREAT);
use Symbol qw(gensym);
use Symbol qw(gensym);
use Exporter ();
-- Previously, if a -dsc command was used to delete all side comments,
- then any special control comments for non-indenting braces got deleted too.
- Now, these control side comments are retained when -dsc is set unless
- a -nnib (--nonon-indenting-braces) flag is also set to deactivate them.
+- The parameter -kbb (--keep-break-before) now ignores a request to break
+ before an opening token, such as '('. Likewise, -kba (--keep-break-after)
+ now ignores a request to break after a closing token, such as ')'. This
+ change was made to avoid a rare instability discovered in random testing.
-- This version runs 15 to 20 percent faster on large files than the
- previous release due to optimizations made with the help of Devel::NYTProf.
+- Previously, if a -dsc command was used to delete all side comments,
+ then any special side comments for controlling non-indenting braces got
+ deleted too. Now, these control side comments are retained when -dsc is
+ set unless a -nnib (--nonon-indenting-braces) flag is also set to
+ deactivate them.
+
+- This version runs about 10 percent faster on large files than the previous
+ release due to optimizations made with the help of Devel::NYTProf. Much
+ of the gain came from faster processing of blank tokens and comments.
- This version of perltidy was stress-tested for many cpu hours with
random input parameters. No failures to converge, internal fault checks,
<h1 id="VERSION">VERSION</h1>
-<p>This man page documents Perl::Tidy version 20220601</p>
+<p>This man page documents Perl::Tidy version 20220613</p>
<h1 id="LICENSE">LICENSE</h1>
'f' matches if the previous token is a function other than a keyword.
'F' matches if 'f' does not.
'w' matches if either 'k' or 'f' match.
- 'W' matches if 'w' does not.</code></pre>
+ 'W' matches if 'w' does not.
+ '*' always matches</code></pre>
<p>So for example the the following parameter will keep breaks after opening function call parens:</p>
<pre><code> perltidy -kba='f('</code></pre>
-<p><b>NOTE</b>: To match all opening curly braces, and no other opening tokens, please prefix the brace it with an asterisk, like this: '*{'. Otherwise a warning message will occur. This is necessary to avoid problems while the input scheme is being updated and generalized. A single bare curly brace previously matched all container tokens, and tentatively still does. Likewise, to match all closing curly braces, and no other closing tokens, use '*}'.</p>
+<p><b>NOTE</b>: A request to break before an opening container, such as <b>-kbb='('</b>, will be silently ignored because it can lead to formatting instability. Likewise, a request to break after a closing container, such as <b>-kba</b>=')', will also be silently ignored.</p>
</dd>
<dt id="iob---ignore-old-breakpoints"><b>-iob</b>, <b>--ignore-old-breakpoints</b></dt>
<h1 id="VERSION">VERSION</h1>
-<p>This man page documents perltidy version 20220601</p>
+<p>This man page documents perltidy version 20220613</p>
<h1 id="BUG-REPORTS">BUG REPORTS</h1>
# Release version must be bumped, and it is probably past time for a
# release anyway.
- $VERSION = '20220601';
+ $VERSION = '20220613';
}
sub DESTROY {
=head1 VERSION
-This man page documents Perl::Tidy version 20220601
+This man page documents Perl::Tidy version 20220613
=head1 LICENSE
use strict;
use warnings;
use English qw( -no_match_vars );
-our $VERSION = '20220601';
+our $VERSION = '20220613';
use constant EMPTY_STRING => q{};
use constant SPACE => q{ };
package Perl::Tidy::DevNull;
use strict;
use warnings;
-our $VERSION = '20220601';
+our $VERSION = '20220613';
sub new { my $self = shift; return bless {}, $self }
sub print { return }
sub close { return }
use strict;
use warnings;
use English qw( -no_match_vars );
-our $VERSION = '20220601';
+our $VERSION = '20220613';
use constant EMPTY_STRING => q{};
package Perl::Tidy::FileWriter;
use strict;
use warnings;
-our $VERSION = '20220601';
+our $VERSION = '20220613';
use constant DEVEL_MODE => 0;
use constant EMPTY_STRING => q{};
package Perl::Tidy::HtmlWriter;
use strict;
use warnings;
-our $VERSION = '20220601';
+our $VERSION = '20220613';
use English qw( -no_match_vars );
use File::Basename;
use strict;
use warnings;
use Carp;
-our $VERSION = '20220601';
+our $VERSION = '20220613';
use constant EMPTY_STRING => q{};
use strict;
use warnings;
use Carp;
-our $VERSION = '20220601';
+our $VERSION = '20220613';
sub AUTOLOAD {
package Perl::Tidy::IndentationItem;
use strict;
use warnings;
-our $VERSION = '20220601';
+our $VERSION = '20220613';
BEGIN {
package Perl::Tidy::LineBuffer;
use strict;
use warnings;
-our $VERSION = '20220601';
+our $VERSION = '20220613';
sub AUTOLOAD {
package Perl::Tidy::LineSink;
use strict;
use warnings;
-our $VERSION = '20220601';
+our $VERSION = '20220613';
sub AUTOLOAD {
package Perl::Tidy::LineSource;
use strict;
use warnings;
-our $VERSION = '20220601';
+our $VERSION = '20220613';
sub AUTOLOAD {
package Perl::Tidy::Logger;
use strict;
use warnings;
-our $VERSION = '20220601';
+our $VERSION = '20220613';
use English qw( -no_match_vars );
use constant EMPTY_STRING => q{};
use warnings;
use English qw( -no_match_vars );
-our $VERSION = '20220601';
+our $VERSION = '20220613';
use constant DEVEL_MODE => 0;
use constant EMPTY_STRING => q{};
use warnings;
use Carp;
use English qw( -no_match_vars );
-our $VERSION = '20220601';
+our $VERSION = '20220613';
use Perl::Tidy::VerticalAligner::Alignment;
use Perl::Tidy::VerticalAligner::Line;
{ #<<< A non-indenting brace
-our $VERSION = '20220601';
+our $VERSION = '20220613';
BEGIN {
package Perl::Tidy::VerticalAligner::Line;
use strict;
use warnings;
-our $VERSION = '20220601';
+our $VERSION = '20220613';
BEGIN {