]> git.donarmstrong.com Git - perltidy.git/commitdiff
bump version to .04 20230309.04
authorSteve Hancock <perltidy@users.sourceforge.net>
Tue, 27 Jun 2023 03:46:21 +0000 (20:46 -0700)
committerSteve Hancock <perltidy@users.sourceforge.net>
Tue, 27 Jun 2023 03:46:21 +0000 (20:46 -0700)
26 files changed:
CHANGES.md
bin/perltidy
docs/ChangeLog.html
docs/Tidy.html
docs/index.html
docs/index.md
docs/perltidy.html
lib/Perl/Tidy.pm
lib/Perl/Tidy.pod
lib/Perl/Tidy/Debugger.pm
lib/Perl/Tidy/DevNull.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/LineBuffer.pm
lib/Perl/Tidy/LineSink.pm
lib/Perl/Tidy/LineSource.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 647b9d12f123957d2b729a776465ea0bdeb0ec92..95d201b7722cba50e390922f7a9e94c57d226a58 100644 (file)
@@ -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<perlcritic>.
+      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,
index c4b2389b92bc45de171f7860e145328b90490780..dfdcdf4b7bf5b6713aa78d27406d3790f451e569 100755 (executable)
@@ -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
 
index 23955dd60b1b6f4022d03997270de8dc7ee26b91..fbf590c502fbfce5a176be00fdb4a64e32b855aa 100644 (file)
@@ -1,8 +1,15 @@
 <h1>Perltidy Change Log</h1>
 
-<h2>2023 03 09.03</h2>
+<h2>2023 03 09.04</h2>
 
-<pre><code>- Issue git #121. Added parameters -xbt, or --extended-block-tightness,
+<pre><code>- 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.
index ae99b6c728785422dfd7a8f22a6d0a95b885d843..eee2389f4b791d3291c3c31198ad98657adb3226 100644 (file)
 
 <h1 id="VERSION">VERSION</h1>
 
-<p>This man page documents Perl::Tidy version 20230309.03</p>
+<p>This man page documents Perl::Tidy version 20230309.04</p>
 
 <h1 id="LICENSE">LICENSE</h1>
 
index 4e671a1d76dbb6874a05e22cb812904603f4acb2..d604c9b641a41f4088349d6ed106e2134a32b724 100644 (file)
@@ -31,7 +31,7 @@ to precisely control the formatting details.</p></li>
 
 <p>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.</p>
+about 4 Mb.</p>
 
 <h2>Download</h2>
 
index 1a73ea8f276a07e00099ac1a4db2dfa5aa8a6e01..f337f6d0bd754b3ae008691c879cb0c6e01036fc 100644 (file)
@@ -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
index 15ec624623f5ba9003044e12f5a14902d3d6f383..eceba979fa32dcb20ee7ce69a6f6e0cf02fba9c1 100644 (file)
 <dt id="enc-s---character-encoding-s"><b>-enc=s</b>, <b>--character-encoding=s</b></dt>
 <dd>
 
-<p>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 <b>use utf8</b>, 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 <b>use utf8</b> directives).</p>
+<p>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 <b>use utf8</b>, 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 <b>use utf8</b> directives). Consequently perltidy is likely to encounter problems formatting a file which is only partially encoded.</p>
 
 <p>The possible values for <b>s</b> are:</p>
 
 <dt id="xbt---extended-block-tightness"><b>-xbt</b>, <b>--extended-block-tightness</b></dt>
 <dd>
 
-<p>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</p>
+<p>The previous section described two controls for spacing within curly braces, namely <b>-block-brace-tightness=n</b> for code block braces and <b>-brace-tightness=n</b> for all other braces.</p>
 
-<pre><code>  print {*STDERR} $message;
-  return @{$self};</code></pre>
+<p>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:</p>
 
-<p>Since perltidy does not format these small containers as code blocks, by default the spacing within for these braces follows the flag <b>--brace-tightness=n</b>.</p>
+<pre><code>    print {*STDERR} $message;
+    return ${$foo};</code></pre>
 
-<p>But they can be made to instead follow the spacing defined by the <b>--block-brace-tightness=n</b> flag by seting <b>--extended-block-tightness</b>.</p>
+<p>Consequently, the spacing within these small braced containers by default follows the flag <b>--brace-tightness=n</b> rather than <b>--block-brace-tightness=n</b>, as one might expect.</p>
+
+<p>If desired, small blocks such as these can be made to instead follow the spacing defined by the <b>--block-brace-tightness=n</b> flag by setting <b>--extended-block-tightness</b>. The specific types of small blocks to which this parameter applies is controlled by a companion control parameter, described in the next section.</p>
 
 <p>Note that if the two flags <b>-bbt=n</b> and <b>-bt=n</b> have the same value <b>n</b> then there would be no reason to set this flag.</p>
 
 <dt id="xbtl-s---extended-block-tightness-list-s"><b>-xbtl=s</b>, <b>--extended-block-tightness-list=s</b></dt>
 <dd>
 
-<p>The small blocks to which the parameter <b>-xbt</b> applies consist of those curly braces preceded by the keywords</p>
+<p>The previous parameter <b>-xbt</b> can be made to apply curly braces preceded by any of the keywords</p>
 
-<pre><code>    print printf sort exec system say</code></pre>
+<pre><code>    print printf exec system say</code></pre>
 
-<p>and special symbols</p>
+<p>and/or the special symbols</p>
 
 <pre><code>    $ @ % &amp; * $#</code></pre>
 
-<p>To restrict <b>-xbt</b> to apply to just the above keywords use</p>
+<p>The parameter string <b>s</b> may contain a selection of these keywords and symbols to indicate the brace types to which <b>-xbt</b> applies. For convenience, all of the keywords can be selected with &#39;k&#39;, and all of the special symbols can be selected with &#39;t&#39;. The default is equivalent to <b>-xbtl=&#39;k&#39;</b>, which selects all of the keywords.</p>
+
+<p>Examples:</p>
 
-<pre><code>   -xbtl=k</code></pre>
+<pre><code>   -xbtl=&#39;k&#39;          # selects just the keywords [DEFAULT]
+   -xbtl=&quot;t&quot;          # selects just the special type symbols
+   -xbtl=&quot;k t&quot;        # selects all keywords and symbols, or more simply
+   -xbtl=&quot;kt&quot;         # selects all keywords and symbols
+   -xbtl=&quot;print say&quot;  # selects just keywords B&lt;print&gt; and B&lt;say&gt;:</code></pre>
 
-<p>and to restrict it to apply to just the above special type symbols use</p>
+<p>Here are some formatting examples using the default values of <b>-bt=n</b> and <b>-bbt=n</b>. Note that in these examples <b>$ref</b> is in block braces but <b>$key</b> is not.</p>
 
-<pre><code>   -xbtl=t</code></pre>
+<pre><code>    # default formatting
+    print {*STDERR} $message;
+    my $val = ${$ref}{$key};
 
-<p>To restrict it to certain specific keywords or type symbols, enter them in the parameter <b>s</b>. For example, the following restricts it apply to just the keywords <b>print</b> and <b>say</b>:</p>
+    # perltidy -xbt           or
+    # perltidy -xbt -xbtl=k
+    print { *STDERR } $message;
+    my $val = ${$ref}{$key};
 
-<pre><code>   -xbtl=&quot;print say&quot;</code></pre>
+    # perltidy -xbt -xbtl=t
+    print {*STDERR} $message;
+    my $val = ${ $ref }{$key};
 
-<p>Note that this parameter merely changes the way that the parameter <b>--extended-block-tightness</b> works. It has no effect unless <b>--extended-block-tightness</b> is set.</p>
+    # perltidy -xbt -xbtl=kt
+    print { *STDERR } $message;
+    my $val = ${ $ref }{$key};</code></pre>
+
+<p>Finally, note that this parameter merely changes the way that the parameter <b>--extended-block-tightness</b> works. It has no effect unless <b>--extended-block-tightness</b> is actually set.</p>
 
 </dd>
 <dt id="tso---tight-secret-operators"><b>-tso</b>, <b>--tight-secret-operators</b></dt>
         $vmsfile =~ s/;[\d\-]*$//
           ;    # Clip off version number; we can use a newer version as well</code></pre>
 
+</dd>
+<dt id="ipc---ignore-perlcritic-comments"><b>-ipc</b>, <b>--ignore-perlcritic-comments</b></dt>
+<dd>
+
+<p>Perltidy, by default, will look for side comments beginning with <b>## no critic</b> and ignore their lengths when making line break decisions, even if the user has not set <b>-iscl</b>. The reason is that an unwanted line break can make these special comments ineffective in controlling <b>perlcritic</b>.</p>
+
+<p>Setting <b>--ignore-perlcritic-comments</b> tells perltidy not to look for these <b>## no critic</b> comments.</p>
+
 </dd>
 <dt id="hsc---hanging-side-comments"><b>-hsc</b>, <b>--hanging-side-comments</b></dt>
 <dd>
 
 <p>Under Windows, perltidy will also search for a configuration file named <i>perltidy.ini</i> since Windows does not allow files with a leading period (.). Use <code>perltidy -dpro</code> to see the possible locations for your system. An example might be <i>C:\Documents and Settings\All Users\perltidy.ini</i>.</p>
 
-<p>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:</p>
-
-<p>http://www.netmanage.com/000/20021101_005_tcm21-6336.pdf</p>
+<p>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.</p>
 
 <p>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</p>
 
  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</code></pre>
+ 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</code></pre>
 
 <p>Equivalently, the prefix &#39;no&#39; or &#39;no-&#39; on the corresponding long names may be used.</p>
 
 
 <h1 id="VERSION">VERSION</h1>
 
-<p>This man page documents perltidy version 20230309.03</p>
+<p>This man page documents perltidy version 20230309.04</p>
 
 <h1 id="BUG-REPORTS">BUG REPORTS</h1>
 
index 616fbe69238c842a77317195b4e5832b4fac7600..a33a9f9feafd9c93ec81e93e7b92947a2a54851e 100644 (file)
@@ -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 {
index 5748e5a95377808b13131be39cb316fca509ca63..0aa54cc1de13360612de468fcc7e4bd15e94b7f8 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 20230309.03
+This man page documents Perl::Tidy version 20230309.04
 
 =head1 LICENSE
 
index f17b5277227e6faf08a35b81718b85ada93a79c4..4ba07988ec50935a66fa33b5ccc72881bc5b3150 100644 (file)
@@ -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{ };
index 0b3b2437e8027646e84c8dbef25b907938d187e2..469973eda68820958bc6602f157de09c958dfe1e 100644 (file)
@@ -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 }
index 200c36222b8a7123cab31db158121b8afa07f40f..18c9679bd08d1a035c3ca7cbbf125752825afb0d 100644 (file)
@@ -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{};
 
index 6ff08d6a853c063b069bca470b4bbda33d7ac6e6..34e5b2be58229b750ae6ce97f28df85188f781f0 100644 (file)
@@ -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{};
index e8185647cbb74cef51153aec2bc43960593404dc..e01a8422b2b4abaf84021546808ab318740eeeb2 100644 (file)
@@ -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()
index d7e45cc97f521fb2d0aceb232f91ddc7b87e0f1f..7306048643c331c43a93ebb6f3798039fd0f90b2 100644 (file)
@@ -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;
index 78fb985422cf5b14a765ccfa746d8efbafc1be46..149d0def321518cd4b4f72880a8438124c6b6c2c 100644 (file)
@@ -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{};
 
index 7af66fe95d798fd1f334c62676453c2de47d64bd..6e6257ae4a0be7d94602d213bfca7c9cb5d0c80c 100644 (file)
@@ -14,7 +14,7 @@ package Perl::Tidy::IOScalarArray;
 use strict;
 use warnings;
 use Carp;
-our $VERSION = '20230309.03';
+our $VERSION = '20230309.04';
 
 sub AUTOLOAD {
 
index f8fe319704f02e48b3ae36e7cfc2176f36d71c13..42433de0d8d11f339221670ce43e98cc48083a66 100644 (file)
@@ -8,7 +8,7 @@
 package Perl::Tidy::IndentationItem;
 use strict;
 use warnings;
-our $VERSION = '20230309.03';
+our $VERSION = '20230309.04';
 
 BEGIN {
 
index af9412439d4db64fa963a9ffa5938050817cfb29..7991b5fd9092bf3394ef9931f3ef31c7d86f583f 100644 (file)
@@ -12,7 +12,7 @@
 package Perl::Tidy::LineBuffer;
 use strict;
 use warnings;
-our $VERSION = '20230309.03';
+our $VERSION = '20230309.04';
 
 sub AUTOLOAD {
 
index fbfaa0ec39ae331c8a509844a2aaf5127ab1ebab..1d75fecec5f2faefcc4371fd298571fef0fe00f1 100644 (file)
@@ -8,7 +8,7 @@
 package Perl::Tidy::LineSink;
 use strict;
 use warnings;
-our $VERSION = '20230309.03';
+our $VERSION = '20230309.04';
 
 sub AUTOLOAD {
 
index 813cfbd660b0be5e49a4ab416c0380a9d184c150..e8b1a4c3e599a2f80fe66344c07744df17b0591f 100644 (file)
@@ -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;
 
index 299fbb300d1be4cf65f9089e9e843a7ff198795d..1ac79cd41b9250d50c73ac2d6ccf600e39b2e9d5 100644 (file)
@@ -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;
index d77b1339286141e58d5b55fb3fdc92e15ff484bb..610b4ab0232f3723a1152e439cf40ef02ce8c49b 100644 (file)
@@ -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;
index 71dbcb4f0174e35781f81bc2970c1a9d669b67fa..e7da5a834325bc757616e253a366b4cf49995d0b 100644 (file)
@@ -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;
 
index b00a3cec88c2abc2028432e96b6eea066b68690b..d14f0d8db56cc7ad292e243dda5d5aa8388ad439 100644 (file)
@@ -10,7 +10,7 @@ use warnings;
 
 { #<<< A non-indenting brace
 
-our $VERSION = '20230309.03';
+our $VERSION = '20230309.04';
 
 sub new {
     my ( $class, $rarg ) = @_;
index f7d48fca3f332c5618fc381a06bd2cd9ddc05691..d6e5c70b6a67b21446def8db2a0d157a41c211b1 100644 (file)
@@ -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 {