From: Steve Hancock Date: Tue, 27 Jun 2023 03:46:21 +0000 (-0700) Subject: bump version to .04 X-Git-Tag: 20230309.04^0 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=1c64ec3826e7894014c5f274120eb33596f52348;p=perltidy.git bump version to .04 --- diff --git a/CHANGES.md b/CHANGES.md index 647b9d12..95d201b7 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,12 +1,12 @@ # Perltidy Change Log -## 2023 03 09.03 +## 2023 03 09.04 - Add parameter -ipc, or --ignore-perlcritic-comments. Perltidy, by - default, will look for side comments beginning with B<## no critic> and + default, will look for side comments beginning with ``## no critic`` and ignore their lengths when making line break decisions, even if the user - has not set B<-iscl>. The reason is that an unwanted line break can - make these special comments ineffective in controlling B. + has not set ``-iscl``. The reason is that an unwanted line break can + make these special comments ineffective in controlling ``perlcritic``. The parameter -ipc can be set if, for some reason, this is not wanted. - Issue git #121. Added parameters -xbt, or --extended-block-tightness, diff --git a/bin/perltidy b/bin/perltidy index c4b2389b..dfdcdf4b 100755 --- a/bin/perltidy +++ b/bin/perltidy @@ -1242,9 +1242,9 @@ abbreviation for the combination <-pt=n -sbt=n -bt=n -bbt=n>. =item B<-xbt>, B<--extended-block-tightness> -There are two controls for spacing within curly braces in this scheme, namely -B<-block-brace-tightness=n> for code block braces and B<-brace-tightness=n> for -all other braces. +The previous section described two controls for spacing within curly braces, +namely B<-block-brace-tightness=n> for code block braces and +B<-brace-tightness=n> for all other braces. There is a little fuzziness in this division of brace types though because the curly braces considered by perltidy to contain code blocks for formatting @@ -5752,7 +5752,7 @@ The perltidy binary uses the Perl::Tidy module and is installed when that module =head1 VERSION -This man page documents perltidy version 20230309.03 +This man page documents perltidy version 20230309.04 =head1 BUG REPORTS diff --git a/docs/ChangeLog.html b/docs/ChangeLog.html index 23955dd6..fbf590c5 100644 --- a/docs/ChangeLog.html +++ b/docs/ChangeLog.html @@ -1,8 +1,15 @@

Perltidy Change Log

-

2023 03 09.03

+

2023 03 09.04

-
- Issue git #121. Added parameters -xbt, or --extended-block-tightness,
+
- Add parameter -ipc, or --ignore-perlcritic-comments.  Perltidy, by
+  default, will look for side comments beginning with ``## no critic`` and
+  ignore their lengths when making line break decisions, even if the user
+  has not set ``-iscl``.  The reason is that an unwanted line break can
+  make these special comments ineffective in controlling ``perlcritic``.
+  The parameter -ipc can be set if, for some reason, this is not wanted.
+
+- Issue git #121. Added parameters -xbt, or --extended-block-tightness,
   and -xbtl=s, or --extended-block-tightness-list=s, to allow
   certain small code blocks to have internal spacing controlled by
   -bbt=n instead of -bt=n. The man pages have details.
diff --git a/docs/Tidy.html b/docs/Tidy.html
index ae99b6c7..eee2389f 100644
--- a/docs/Tidy.html
+++ b/docs/Tidy.html
@@ -399,7 +399,7 @@
 
 

VERSION

-

This man page documents Perl::Tidy version 20230309.03

+

This man page documents Perl::Tidy version 20230309.04

LICENSE

diff --git a/docs/index.html b/docs/index.html index 4e671a1d..d604c9b6 100644 --- a/docs/index.html +++ b/docs/index.html @@ -31,7 +31,7 @@ to precisely control the formatting details.

Perltidy should run on any system with perl 5.008 or later. The total disk space needed after removing the installation directory will be -about 2 Mb.

+about 4 Mb.

Download

diff --git a/docs/index.md b/docs/index.md index 1a73ea8f..f337f6d0 100644 --- a/docs/index.md +++ b/docs/index.md @@ -34,7 +34,7 @@ to precisely control the formatting details. Perltidy should run on any system with perl 5.008 or later. The total disk space needed after removing the installation directory will be -about 2 Mb. +about 4 Mb. ## Download diff --git a/docs/perltidy.html b/docs/perltidy.html index 15ec6246..eceba979 100644 --- a/docs/perltidy.html +++ b/docs/perltidy.html @@ -444,7 +444,7 @@
-enc=s, --character-encoding=s
-

This flag indicates if the input data stream use a character encoding. Perltidy does not look for the encoding directives in the source stream, such as use utf8, and instead relies on this flag to determine the encoding. (Note that perltidy often works on snippets of code rather than complete files so it cannot rely on use utf8 directives).

+

This flag indicates if the input data stream uses a character encoding. Perltidy does not look for the encoding directives in the source stream, such as use utf8, and instead relies on this flag to determine the encoding. (This is because perltidy often works on snippets of code rather than complete files, so it cannot rely on use utf8 directives). Consequently perltidy is likely to encounter problems formatting a file which is only partially encoded.

The possible values for s are:

@@ -939,14 +939,16 @@
-xbt, --extended-block-tightness
-

Curly braces which are considered by perltidy to contain code blocks for formatting purposes exclude some of the code blocks used by Perl mainly for isolating terms. These include curly braces following a keyword where an indirect object might occur, or curly braces following a type symbol. For example

+

The previous section described two controls for spacing within curly braces, namely -block-brace-tightness=n for code block braces and -brace-tightness=n for all other braces.

-
  print {*STDERR} $message;
-  return @{$self};
+

There is a little fuzziness in this division of brace types though because the curly braces considered by perltidy to contain code blocks for formatting purposes, such as highlighting code structure, exclude some of the small code blocks used by Perl mainly for isolating terms. These include curly braces following a keyword where an indirect object might occur, or curly braces following a type symbol. For example, perltidy does not mark the following braces as code block braces:

-

Since perltidy does not format these small containers as code blocks, by default the spacing within for these braces follows the flag --brace-tightness=n.

+
    print {*STDERR} $message;
+    return ${$foo};
-

But they can be made to instead follow the spacing defined by the --block-brace-tightness=n flag by seting --extended-block-tightness.

+

Consequently, the spacing within these small braced containers by default follows the flag --brace-tightness=n rather than --block-brace-tightness=n, as one might expect.

+ +

If desired, small blocks such as these can be made to instead follow the spacing defined by the --block-brace-tightness=n flag by setting --extended-block-tightness. The specific types of small blocks to which this parameter applies is controlled by a companion control parameter, described in the next section.

Note that if the two flags -bbt=n and -bt=n have the same value n then there would be no reason to set this flag.

@@ -954,27 +956,44 @@
-xbtl=s, --extended-block-tightness-list=s
-

The small blocks to which the parameter -xbt applies consist of those curly braces preceded by the keywords

+

The previous parameter -xbt can be made to apply curly braces preceded by any of the keywords

-
    print printf sort exec system say
+
    print printf exec system say
-

and special symbols

+

and/or the special symbols

    $ @ % & * $#
-

To restrict -xbt to apply to just the above keywords use

+

The parameter string s may contain a selection of these keywords and symbols to indicate the brace types to which -xbt applies. For convenience, all of the keywords can be selected with 'k', and all of the special symbols can be selected with 't'. The default is equivalent to -xbtl='k', which selects all of the keywords.

+ +

Examples:

-
   -xbtl=k
+
   -xbtl='k'          # selects just the keywords [DEFAULT]
+   -xbtl="t"          # selects just the special type symbols
+   -xbtl="k t"        # selects all keywords and symbols, or more simply
+   -xbtl="kt"         # selects all keywords and symbols
+   -xbtl="print say"  # selects just keywords B<print> and B<say>:
-

and to restrict it to apply to just the above special type symbols use

+

Here are some formatting examples using the default values of -bt=n and -bbt=n. Note that in these examples $ref is in block braces but $key is not.

-
   -xbtl=t
+
    # default formatting
+    print {*STDERR} $message;
+    my $val = ${$ref}{$key};
 
-

To restrict it to certain specific keywords or type symbols, enter them in the parameter s. For example, the following restricts it apply to just the keywords print and say:

+ # perltidy -xbt or + # perltidy -xbt -xbtl=k + print { *STDERR } $message; + my $val = ${$ref}{$key}; -
   -xbtl="print say"
+ # perltidy -xbt -xbtl=t + print {*STDERR} $message; + my $val = ${ $ref }{$key}; -

Note that this parameter merely changes the way that the parameter --extended-block-tightness works. It has no effect unless --extended-block-tightness is set.

+ # perltidy -xbt -xbtl=kt + print { *STDERR } $message; + my $val = ${ $ref }{$key};
+ +

Finally, note that this parameter merely changes the way that the parameter --extended-block-tightness works. It has no effect unless --extended-block-tightness is actually set.

-tso, --tight-secret-operators
@@ -1392,6 +1411,14 @@ $vmsfile =~ s/;[\d\-]*$// ; # Clip off version number; we can use a newer version as well
+ +
-ipc, --ignore-perlcritic-comments
+
+ +

Perltidy, by default, will look for side comments beginning with ## no critic and ignore their lengths when making line break decisions, even if the user has not set -iscl. The reason is that an unwanted line break can make these special comments ineffective in controlling perlcritic.

+ +

Setting --ignore-perlcritic-comments tells perltidy not to look for these ## no critic comments.

+
-hsc, --hanging-side-comments
@@ -3927,9 +3954,7 @@

Under Windows, perltidy will also search for a configuration file named perltidy.ini since Windows does not allow files with a leading period (.). Use perltidy -dpro to see the possible locations for your system. An example might be C:\Documents and Settings\All Users\perltidy.ini.

-

Another option is the use of the PERLTIDY environment variable. The method for setting environment variables depends upon the version of Windows that you are using. Instructions for Windows 95 and later versions can be found here:

- -

http://www.netmanage.com/000/20021101_005_tcm21-6336.pdf

+

Another option is the use of the PERLTIDY environment variable. The method for setting environment variables depends upon the version of Windows that you are using.

Under Windows NT / 2000 / XP the PERLTIDY environment variable can be placed in either the user section or the system section. The later makes the configuration file common to all users on the machine. Be sure to enter the full path of the configuration file in the value of the environment variable. Ex. PERLTIDY=C:\Documents and Settings\perltidy.ini

@@ -4381,14 +4406,14 @@ hbm hbn hbp hbpd hbpu hbq hbs hbsc hbv hbw hent hic hicm hico hih hihh hii hij hik him hin hip hipd hipu hiq his hisc hiv hiw hsc - html ibc icb icp iob isbc iscl kgb kgbd kgbi - kis lal log lop lp lsl mem nib ohbr okw - ola olc oll olq opr opt osbc osbr otr ple - pod pvl q sac sbc sbl scbb schb scp scsb - sct se sfp sfs skp sob sobb sohb sop sosb - sot ssc st sts t tac tbc toc tp tqw - trp ts tsc tso vbc vc viu vmll vsc w - wfc wn x xbt xci xlp xs
+ html ibc icb icp iob ipc isbc iscl kgb kgbd + kgbi kis lal log lop lp lsl mem nib ohbr + okw ola olc oll olq opr opt osbc osbr otr + ple pod pvl q sac sbc sbl scbb schb scp + scsb sct se sfp sfs skp sob sobb sohb sop + sosb sot ssc st sts t tac tbc toc tp + tqw trp ts tsc tso vbc vc viu vmll vsc + w wfc wn x xbt xci xlp xs

Equivalently, the prefix 'no' or 'no-' on the corresponding long names may be used.

@@ -4466,7 +4491,7 @@

VERSION

-

This man page documents perltidy version 20230309.03

+

This man page documents perltidy version 20230309.04

BUG REPORTS

diff --git a/lib/Perl/Tidy.pm b/lib/Perl/Tidy.pm index 616fbe69..a33a9f9f 100644 --- a/lib/Perl/Tidy.pm +++ b/lib/Perl/Tidy.pm @@ -114,7 +114,7 @@ BEGIN { # then the Release version must be bumped, and it is probably past time for # a release anyway. - $VERSION = '20230309.03'; + $VERSION = '20230309.04'; } ## end BEGIN sub DESTROY { diff --git a/lib/Perl/Tidy.pod b/lib/Perl/Tidy.pod index 5748e5a9..0aa54cc1 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 20230309.03 +This man page documents Perl::Tidy version 20230309.04 =head1 LICENSE diff --git a/lib/Perl/Tidy/Debugger.pm b/lib/Perl/Tidy/Debugger.pm index f17b5277..4ba07988 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 = '20230309.03'; +our $VERSION = '20230309.04'; use constant EMPTY_STRING => q{}; use constant SPACE => q{ }; diff --git a/lib/Perl/Tidy/DevNull.pm b/lib/Perl/Tidy/DevNull.pm index 0b3b2437..469973ed 100644 --- a/lib/Perl/Tidy/DevNull.pm +++ b/lib/Perl/Tidy/DevNull.pm @@ -7,7 +7,7 @@ package Perl::Tidy::DevNull; use strict; use warnings; -our $VERSION = '20230309.03'; +our $VERSION = '20230309.04'; sub new { my $self = shift; return bless {}, $self } sub print { return } sub close { return } diff --git a/lib/Perl/Tidy/Diagnostics.pm b/lib/Perl/Tidy/Diagnostics.pm index 200c3622..18c9679b 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 = '20230309.03'; +our $VERSION = '20230309.04'; use constant EMPTY_STRING => q{}; diff --git a/lib/Perl/Tidy/FileWriter.pm b/lib/Perl/Tidy/FileWriter.pm index 6ff08d6a..34e5b2be 100644 --- a/lib/Perl/Tidy/FileWriter.pm +++ b/lib/Perl/Tidy/FileWriter.pm @@ -7,7 +7,7 @@ package Perl::Tidy::FileWriter; use strict; use warnings; -our $VERSION = '20230309.03'; +our $VERSION = '20230309.04'; 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 e8185647..e01a8422 100644 --- a/lib/Perl/Tidy/Formatter.pm +++ b/lib/Perl/Tidy/Formatter.pm @@ -53,7 +53,7 @@ use constant SPACE => q{ }; use Carp; use English qw( -no_match_vars ); use List::Util qw( min max ); # min, max are in Perl 5.8 -our $VERSION = '20230309.03'; +our $VERSION = '20230309.04'; # The Tokenizer will be loaded with the Formatter ##use Perl::Tidy::Tokenizer; # for is_keyword() diff --git a/lib/Perl/Tidy/HtmlWriter.pm b/lib/Perl/Tidy/HtmlWriter.pm index d7e45cc9..73060486 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 = '20230309.03'; +our $VERSION = '20230309.04'; use English qw( -no_match_vars ); use File::Basename; diff --git a/lib/Perl/Tidy/IOScalar.pm b/lib/Perl/Tidy/IOScalar.pm index 78fb9854..149d0def 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 = '20230309.03'; +our $VERSION = '20230309.04'; use constant EMPTY_STRING => q{}; diff --git a/lib/Perl/Tidy/IOScalarArray.pm b/lib/Perl/Tidy/IOScalarArray.pm index 7af66fe9..6e6257ae 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 = '20230309.03'; +our $VERSION = '20230309.04'; sub AUTOLOAD { diff --git a/lib/Perl/Tidy/IndentationItem.pm b/lib/Perl/Tidy/IndentationItem.pm index f8fe3197..42433de0 100644 --- a/lib/Perl/Tidy/IndentationItem.pm +++ b/lib/Perl/Tidy/IndentationItem.pm @@ -8,7 +8,7 @@ package Perl::Tidy::IndentationItem; use strict; use warnings; -our $VERSION = '20230309.03'; +our $VERSION = '20230309.04'; BEGIN { diff --git a/lib/Perl/Tidy/LineBuffer.pm b/lib/Perl/Tidy/LineBuffer.pm index af941243..7991b5fd 100644 --- a/lib/Perl/Tidy/LineBuffer.pm +++ b/lib/Perl/Tidy/LineBuffer.pm @@ -12,7 +12,7 @@ package Perl::Tidy::LineBuffer; use strict; use warnings; -our $VERSION = '20230309.03'; +our $VERSION = '20230309.04'; sub AUTOLOAD { diff --git a/lib/Perl/Tidy/LineSink.pm b/lib/Perl/Tidy/LineSink.pm index fbfaa0ec..1d75fece 100644 --- a/lib/Perl/Tidy/LineSink.pm +++ b/lib/Perl/Tidy/LineSink.pm @@ -8,7 +8,7 @@ package Perl::Tidy::LineSink; use strict; use warnings; -our $VERSION = '20230309.03'; +our $VERSION = '20230309.04'; sub AUTOLOAD { diff --git a/lib/Perl/Tidy/LineSource.pm b/lib/Perl/Tidy/LineSource.pm index 813cfbd6..e8b1a4c3 100644 --- a/lib/Perl/Tidy/LineSource.pm +++ b/lib/Perl/Tidy/LineSource.pm @@ -9,7 +9,7 @@ package Perl::Tidy::LineSource; use strict; use warnings; use English qw( -no_match_vars ); -our $VERSION = '20230309.03'; +our $VERSION = '20230309.04'; use constant DEVEL_MODE => 0; diff --git a/lib/Perl/Tidy/Logger.pm b/lib/Perl/Tidy/Logger.pm index 299fbb30..1ac79cd4 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 = '20230309.03'; +our $VERSION = '20230309.04'; use English qw( -no_match_vars ); use constant DEVEL_MODE => 0; diff --git a/lib/Perl/Tidy/Tokenizer.pm b/lib/Perl/Tidy/Tokenizer.pm index d77b1339..610b4ab0 100644 --- a/lib/Perl/Tidy/Tokenizer.pm +++ b/lib/Perl/Tidy/Tokenizer.pm @@ -23,7 +23,7 @@ use strict; use warnings; use English qw( -no_match_vars ); -our $VERSION = '20230309.03'; +our $VERSION = '20230309.04'; use Perl::Tidy::LineBuffer; use Carp; diff --git a/lib/Perl/Tidy/VerticalAligner.pm b/lib/Perl/Tidy/VerticalAligner.pm index 71dbcb4f..e7da5a83 100644 --- a/lib/Perl/Tidy/VerticalAligner.pm +++ b/lib/Perl/Tidy/VerticalAligner.pm @@ -3,7 +3,7 @@ use strict; use warnings; use Carp; use English qw( -no_match_vars ); -our $VERSION = '20230309.03'; +our $VERSION = '20230309.04'; 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 b00a3cec..d14f0d8d 100644 --- a/lib/Perl/Tidy/VerticalAligner/Alignment.pm +++ b/lib/Perl/Tidy/VerticalAligner/Alignment.pm @@ -10,7 +10,7 @@ use warnings; { #<<< A non-indenting brace -our $VERSION = '20230309.03'; +our $VERSION = '20230309.04'; sub new { my ( $class, $rarg ) = @_; diff --git a/lib/Perl/Tidy/VerticalAligner/Line.pm b/lib/Perl/Tidy/VerticalAligner/Line.pm index f7d48fca..d6e5c70b 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; use English qw( -no_match_vars ); -our $VERSION = '20230309.03'; +our $VERSION = '20230309.04'; sub AUTOLOAD {