]> git.donarmstrong.com Git - perltidy.git/commitdiff
update to preliminary v20220601
authorSteve Hancock <perltidy@users.sourceforge.net>
Sat, 28 May 2022 02:16:03 +0000 (19:16 -0700)
committerSteve Hancock <perltidy@users.sourceforge.net>
Sat, 28 May 2022 02:16:03 +0000 (19:16 -0700)
26 files changed:
CHANGES.md
Makefile.PL
bin/perltidy
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/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
local-docs/Release-Checklist.md

index b2eef0f04f7c6e57f0d2f4e37ffb48a359cf6d6f..2214c328af8d83786832e3700997cc0f16a89254 100644 (file)
@@ -1,6 +1,6 @@
 # Perltidy Change Log
 
-## 2022 02 17.04
+## 2022 06 01
 
     - The flag --encode-output-strings, or -eos, is now set on by default, as
       noted in the discussion of issue git #92.  This has no effect on the use
index 34eb0d4f3820fb0aaef1cd3aacd1e1c2c388d7b7..09b23bea4759e5f6e426054edba100a9c56b25fa 100644 (file)
@@ -1,4 +1,23 @@
 use ExtUtils::MakeMaker;
+
+my $mm_ver = $ExtUtils::MakeMaker::VERSION;
+if ( $mm_ver =~ /_/ ) {    # developer release/version
+    $mm_ver = eval $mm_ver;
+    die $@ if $@;
+}
+
+#   Minimum version found by perlver:
+#
+#     ------------------------------------------
+#   | file        | explicit | syntax | external |
+#   | ------------------------------------------ |
+#   | perltidy.pl | v5.8.0   | v5.8.0 | n/a      |
+#   | ------------------------------------------ |
+#   | Minimum explicit version : v5.8.0          |
+#   | Minimum syntax version   : v5.8.0          |
+#   | Minimum version of perl  : v5.8.0          |
+#     ------------------------------------------
+
 WriteMakefile(
     NAME         => "Perl::Tidy",
     VERSION_FROM => "lib/Perl/Tidy.pm",
@@ -11,6 +30,10 @@ WriteMakefile(
           )
         : ()
     ),
+    (
+        $mm_ver >= 6.48 ? ( MIN_PERL_VERSION => 5.008 )
+        : ()
+    ),
 
     EXE_FILES  => ['bin/perltidy'],
     dist       => { COMPRESS => 'gzip', SUFFIX => 'gz' },
index 62a7c629188a07a9b830981474969e70a3e530d2..5b7f1e7a667e05999c08835d6797fd9040947d5c 100755 (executable)
@@ -5163,7 +5163,7 @@ The perltidy binary uses the Perl::Tidy module and is installed when that module
 
 =head1 VERSION
 
-This man page documents perltidy version 20220217.04
+This man page documents perltidy version 20220601
 
 =head1 BUG REPORTS
 
index 41581cc03e9bcd563bc53b071fd30824ea9d557d..c458f53049048d73e0cfb56aab59490da6a47907 100644 (file)
@@ -1,5 +1,47 @@
 <h1>Perltidy Change Log</h1>
 
+<h2>2022 06 01</h2>
+
+<pre><code>- The flag --encode-output-strings, or -eos, is now set on by default, as
+  noted in the discussion of issue git #92.  This has no effect on the use
+  of the 'perltidy' binary but could change the behavior of programs which
+  use the Perl::Tidy module on files encoded in UTF-8.  If any problems are
+  noticed, an emergency fix can be made by reverting to the old default with
+  the flag -neos.  For complete details see:
+
+       https://github.com/perltidy/perltidy/blob/master/docs/eos_flag.md
+
+- Add vertical alignment for qw quotes in 'use' statements (see issue #git 93).
+  This is on by default but can be turned off with -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 Exporter ();
+
+    # new default
+    use Getopt::Long qw(GetOptions);
+    use Fcntl        qw(O_RDONLY O_WRONLY O_EXCL O_CREAT);
+    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 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 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.
+
+- Fixed and reactivated two failing installation tests (they were reading
+  a local .perltidyrc file)
+</code></pre>
+
 <h2>2022 02 17</h2>
 
 <pre><code>- A new flag, --encode-output-strings, or -eos, has been added to resolve
index 3b47e6c43e4684df3f9544e1c48d5c19cbac2cc9..96e326f89ade0b01c6cac7cb278eb055c9741cb1 100644 (file)
@@ -61,7 +61,7 @@
 <pre><code>    use Perl::Tidy;
     Perl::Tidy::perltidy();</code></pre>
 
-<p>The call to <b>perltidy</b> returns a scalar <b>$error_flag</b> which is TRUE if an error caused premature termination, and FALSE if the process ran to normal completion. Additional discuss of errors is contained below in the <a href="#ERROR-HANDLING">&quot;ERROR HANDLING&quot;</a> section.</p>
+<p>The call to <b>perltidy</b> returns a scalar <b>$error_flag</b> which is TRUE if an error caused premature termination, and FALSE if the process ran to normal completion. Additional discuss of errors is contained below in the <a href="#ERROR-HANDLING">ERROR HANDLING</a> section.</p>
 
 <p>The module accepts input and output streams by a variety of methods. The following list of parameters may be any of the following: a filename, an ARRAY reference, a SCALAR reference, or an object with either a <b>getline</b> or <b>print</b> method, as appropriate.</p>
 
 
 <p>If the <b>destination</b> parameter is given, it will be used to define the file or memory location to receive output of perltidy.</p>
 
-<p><b>Important note if destination is a string or array reference</b>. Perl strings of characters which are decoded as utf8 by Perl::Tidy can be returned in either of two possible states, decoded or encoded, and it is important that the calling program and Perl::Tidy are in agreement regarding the state to be returned. A flag <b>--encode-output-strings</b>, or simply <b>-eos</b>, was added in versions of Perl::Tidy after 20220101 for this purpose. This flag should be added to the end of the <b>argv</b> paremeter (described below) if Perl::Tidy will be decoding utf8 text. The options are as follows.</p>
+<p><b>Important note if destination is a string or array reference</b>. Perl strings of characters which are decoded as utf8 by Perl::Tidy can be returned in either of two possible states, decoded or encoded, and it is important that the calling program and Perl::Tidy are in agreement regarding the state to be returned. A flag <b>--encode-output-strings</b>, or simply <b>-eos</b>, was added in Perl::Tidy version 20220217 for this purpose.</p>
 
 <ul>
 
-<li><p>Use <b>-eos</b> if Perl::Tidy should encode any string which it decodes. This is probably most convenient for most programs. But do not use this setting if the calling program will encode the data too, because double encoding will corrupt data.</p>
+<li><p>Use <b>-eos</b> if Perl::Tidy should encode any string which it decodes. This is the current default because it makes perltidy behave well as a filter, and is the correct setting for most programs. But do not use this setting if the calling program will encode the data too, because double encoding will corrupt data.</p>
 
 </li>
-<li><p>Use <b>-neos</b> if a string should remain decoded if it was decoded by Perl::Tidy. This is appropriate if the calling program will handle any needed encoding before outputting the string.</p>
-
-</li>
-<li><p>The current default is <b>-neos</b>, but <b>the default could change in a future version</b>, so <b>-neos</b> should still be set, if appropriate, to allow for the possibility of a future change in the default.</p>
+<li><p>Use <b>-neos</b> if a string should remain decoded if it was decoded by Perl::Tidy. This is only appropriate if the calling program will handle any needed encoding before outputting the string. If needed, this flag can be added to the end of the <b>argv</b> parameter passed to Perl::Tidy.</p>
 
 </li>
 </ul>
 
-<p>For example, to set <b>-eos</b> the following could be used</p>
+<p>For some background information see <a href="https://github.com/perltidy/perltidy/blob/master/docs/eos_flag.md">https://github.com/perltidy/perltidy/blob/master/docs/eos_flag.md</a>.</p>
 
-<pre><code>        $argv .= &quot; -eos&quot; if ( $Perl::Tidy::VERSION &gt; 20220101 );
+<p>This change in default behavior was made over a period of time as follows:</p>
 
-        $error_flag = Perl::Tidy::perltidy(
-            argv        =&gt; $argv,
-            source      =&gt; \$source,
-            destination =&gt; \$destination,
-            stderr      =&gt; \$stderr,
-            errorfile   =&gt; \$errorfile
-        );</code></pre>
+<ul>
 
-<p>The test on version allows older versions of Perl::Tidy to still be used.</p>
+<li><p>For versions before 20220217 the <b>-eos</b> flag was not available and the behavior was equivalent to <b>-neos</b>.</p>
+
+</li>
+<li><p>In version 20220217 the <b>-eos</b> flag was added but the default remained <b>-neos</b>.</p>
 
-<p>For some background information see <a href="https://github.com/perltidy/perltidy/issues/83">https://github.com/perltidy/perltidy/issues/83</a> and <a href="https://github.com/houseabsolute/perl-code-tidyall/issues/84">https://github.com/houseabsolute/perl-code-tidyall/issues/84</a>.</p>
+</li>
+<li><p>For versions after 20220217 the default was set to <b>-eos</b>.</p>
+
+</li>
+</ul>
 
 </dd>
 <dt id="stderr"><b>stderr</b></dt>
 
 <h1 id="VERSION">VERSION</h1>
 
-<p>This man page documents Perl::Tidy version 20220217</p>
+<p>This man page documents Perl::Tidy version 20220601</p>
 
 <h1 id="LICENSE">LICENSE</h1>
 
index dd4382895bd8fbe7d45e881b0333c034efafa8a7..085b9cd4ff039d8307131bdc3aaaa5ef9eca1413 100644 (file)
 
 <pre><code>        perltidy -sal=&#39;method fun _sub M4&#39;</code></pre>
 
-<p>will cause the perltidy to treate the words &#39;method&#39;, &#39;fun&#39;, &#39;_sub&#39; and &#39;M4&#39; to be treated the same as if they were &#39;sub&#39;. Note that if the alias words are separated by spaces then the string of words should be placed in quotes.</p>
+<p>will cause the perltidy to treat the words &#39;method&#39;, &#39;fun&#39;, &#39;_sub&#39; and &#39;M4&#39; the same as if they were &#39;sub&#39;. Note that if the alias words are separated by spaces then the string of words should be placed in quotes.</p>
 
 <p>Note that several other parameters accept a list of keywords, including &#39;sub&#39; (see <a href="#Specifying-Block-Types">&quot;Specifying Block Types&quot;</a>). You do not need to include any sub aliases in these lists. Just include keyword &#39;sub&#39; if you wish, and all aliases are automatically included.</p>
 
 <dt id="gal-s---grep-alias-list-s"><b>-gal=s</b>, <b>--grep-alias-list=s</b></dt>
 <dd>
 
-<p>This flag allows a code block following an external &#39;list operator&#39; function to be formatted as if it followed one of the builtin keywords <b>grep</b>, <b>map</b> or <b>sort</b>. The string <b>s</b> contains the names of one or more such list operators, separated by spaces or commas.</p>
+<p>This flag allows a code block following an external &#39;list operator&#39; function to be formatted as if it followed one of the built-in keywords <b>grep</b>, <b>map</b> or <b>sort</b>. The string <b>s</b> contains the names of one or more such list operators, separated by spaces or commas.</p>
 
 <p>By &#39;list operator&#39; is meant a function which is invoked in the form</p>
 
 <dt id="et-n---entab-leading-whitespace"><b>-et=n</b>, <b>--entab-leading-whitespace</b></dt>
 <dd>
 
-<p>This flag causes each <b>n</b> initial space characters to be replaced by one tab character.</p>
+<p>This flag causes each <b>n</b> leading space characters produced by the formatting process to be replaced by one tab character. The formatting process itself works with space characters. The <b>-et=n</b> parameter is applied as a last step, after formatting is complete, to convert leading spaces into tabs. Before starting to use tabs, it is essential to first get the indentation controls set as desired without tabs, particularly the two parameters <b>--indent-columns=n</b> (or <b>-i=n</b>) and <b>--continuation-indentation=n</b> (or <b>-ci=n</b>).</p>
 
-<p>The value of the integer <b>n</b> can be any value but can be coordinated with the number of spaces used for intentation. For example, <b>-et=4 -ci=4 -i=4</b> will produce one tab for each indentation level and and one for each continuation indentation level. You may want to coordinate the value of <b>n</b> with what your display software assumes for the spacing of a tab.</p>
+<p>The value of the integer <b>n</b> can be any value but can be coordinated with the number of spaces used for indentation. For example, <b>-et=4 -ci=4 -i=4</b> will produce one tab for each indentation level and and one for each continuation indentation level. You may want to coordinate the value of <b>n</b> with what your display software assumes for the spacing of a tab.</p>
 
 </dd>
 <dt id="t---tabs"><b>-t</b>, <b>--tabs</b></dt>
 <dd>
 
-<p>This flag causes one leading tab character to be inserted for each level of indentation. Certain other features are incompatible with this option, and if these options are also given, then a warning message will be issued and this flag will be unset. One example is the <b>-lp</b> option. This flag is retained for backwards compatibility, but if you use tabs, the <b>-et=n</b> flag is recommended.</p>
+<p>This flag causes one leading tab character to be inserted for each level of indentation. Certain other features are incompatible with this option, and if these options are also given, then a warning message will be issued and this flag will be unset. One example is the <b>-lp</b> option. This flag is retained for backwards compatibility, but if you use tabs, the <b>-et=n</b> flag is recommended. If both <b>-t</b> and <b>-et=n</b> are set, the <b>-et=n</b> is used.</p>
 
 </dd>
 <dt id="dt-n---default-tabsize-n"><b>-dt=n</b>, <b>--default-tabsize=n</b></dt>
 <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 soure 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 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>The possible values for <b>s</b> are:</p>
 
 <dt id="eos-s---encode-output-strings-s"><b>-eos=s</b>, <b>--encode-output-strings=s</b></dt>
 <dd>
 
-<p>This flag has been added to resolve an issue involving the interface between Perl::Tidy and calling programs, and in particular <b>Code::TidyAll (tidyall)</b>. By default Perl::Tidy returns unencoded strings to the calling program, but some programs expect encoded strings. Setting this flag causes Perl::Tidy to return encoded output strings which it decoded. For some background information see <a href="https://github.com/perltidy/perltidy/issues/83">https://github.com/perltidy/perltidy/issues/83</a> and <a href="https://github.com/houseabsolute/perl-code-tidyall/issues/84">https://github.com/houseabsolute/perl-code-tidyall/issues/84</a>.</p>
+<p>This flag was added to resolve an issue involving the interface between Perl::Tidy and calling programs, and in particular <b>Code::TidyAll (tidyall)</b>.</p>
 
-<p>If you only run the <b>perltidy</b> binary this flag has no effect.</p>
+<p>If you only run the <b>perltidy</b> binary this flag has no effect. If you run a program which calls the Perl::Tidy module and receives a string in return, then the meaning of the flag is as follows:</p>
 
-<p>If you use <b>tidyall</b> with encoded files and encounter irregularities such as <b>wide character</b> messages you should set this flag.</p>
+<ul>
+
+<li><p>The setting <b>-eos</b> means Perl::Tidy should encode any string which it decodes. This is the default because it makes perltidy behave well as a filter, and is the correct setting for most programs.</p>
 
-<p>Additional information can be found in the man pages for the <b>Perl::Tidy</b> module.</p>
+</li>
+<li><p>The setting <b>-neos</b> means that a string should remain decoded if it was decoded by Perl::Tidy. This is only appropriate if the calling program will handle any needed encoding before outputting the string.</p>
+
+</li>
+</ul>
+
+<p>The default was changed from <b>-neos</b> to <b>-eos</b> in versions after 20220217. If this change causes a program to start running incorrectly on encoded files, an emergency fix might be to set <b>-neos</b>. Additional information can be found in the man pages for the <b>Perl::Tidy</b> module and also in <a href="https://github.com/perltidy/perltidy/blob/master/docs/eos_flag.md">https://github.com/perltidy/perltidy/blob/master/docs/eos_flag.md</a>.</p>
 
 </dd>
 <dt id="gcs---use-unicode-gcstring"><b>-gcs</b>, <b>--use-unicode-gcstring</b></dt>
 
 <p>By default, perltidy examines the input file and tries to determine the starting indentation level. While it is often zero, it may not be zero for a code snippet being sent from an editing session.</p>
 
-<p>To guess the starting indentation level perltidy simply assumes that indentation scheme used to create the code snippet is the same as is being used for the current perltidy process. This is the only sensible guess that can be made. It should be correct if this is true, but otherwise it probably won&#39;t. For example, if the input script was written with -i=2 and the current peltidy flags have -i=4, the wrong initial indentation will be guessed for a code snippet which has non-zero initial indentation. Likewise, if an entabbing scheme is used in the input script and not in the current process then the guessed indentation will be wrong.</p>
+<p>To guess the starting indentation level perltidy simply assumes that indentation scheme used to create the code snippet is the same as is being used for the current perltidy process. This is the only sensible guess that can be made. It should be correct if this is true, but otherwise it probably won&#39;t. For example, if the input script was written with -i=2 and the current perltidy flags have -i=4, the wrong initial indentation will be guessed for a code snippet which has non-zero initial indentation. Likewise, if an entabbing scheme is used in the input script and not in the current process then the guessed indentation will be wrong.</p>
 
 <p>If the default method does not work correctly, or you want to change the starting level, use <b>-sil=n</b>, to force the starting level to be n.</p>
 
 
 <p>These flags have no effect on code BLOCKS, such as if/then/else blocks, which always use whatever is specified with <b>-i=n</b>.</p>
 
-<p>Some limitiations on these flags are:</p>
+<p>Some limitations on these flags are:</p>
 
 <ul>
 
 
 <p>Only one of these two flags may be used. Both flags can achieve the same result, but the <b>-lpil=s</b> flag is much easier to describe and use and is recommended. The <b>-lpxl=s</b> flag was the original implementation and is only retained for backwards compatibility.</p>
 
-<p>This list <b>s</b> for these parametes is a string with space-separated items. Each item consists of up to three pieces of information in this order: (1) an optional letter code (2) a required container type, and (3) an optional numeric code.</p>
+<p>This list <b>s</b> for these parameters is a string with space-separated items. Each item consists of up to three pieces of information in this order: (1) an optional letter code (2) a required container type, and (3) an optional numeric code.</p>
 
 <p>The only required piece of information is a container type, which is one of &#39;(&#39;, &#39;[&#39;, or &#39;{&#39;. For example the string</p>
 
 <pre><code>  -lpil=&#39;(&#39;</code></pre>
 
-<p>means use -lp formatting only on lists within parentheses, not lists in square-bracets or braces. The same thing could alternatively be specified with</p>
+<p>means use -lp formatting only on lists within parentheses, not lists in square-brackets or braces. The same thing could alternatively be specified with</p>
 
 <pre><code>  -lpxl = &#39;[ {&#39;</code></pre>
 
 
 <p>A second optional item of information which can be given for parentheses is an alphanumeric letter which is used to limit the selection further depending on the type of token immediately before the paren. The possible letters are currently &#39;k&#39;, &#39;K&#39;, &#39;f&#39;, &#39;F&#39;, &#39;w&#39;, and &#39;W&#39;, with these meanings for matching whatever precedes an opening paren:</p>
 
-<pre><code> &#39;k&#39; matches if the previous nonblank token is a perl builtin keyword (such as &#39;if&#39;, &#39;while&#39;),
+<pre><code> &#39;k&#39; matches if the previous nonblank token is a perl built-in keyword (such as &#39;if&#39;, &#39;while&#39;),
  &#39;K&#39; matches if &#39;k&#39; does not, meaning that the previous token is not a keyword.
  &#39;f&#39; matches if the previous token is a function other than a keyword.
  &#39;F&#39; matches if &#39;f&#39; does not.
 <pre><code>  # perltidy -nwrs=&#39;+&#39;, syntax error:
   for my $severity ( reverse $SEVERITY_LOWEST +1 .. $SEVERITY_HIGHEST ) { ... }</code></pre>
 
-<p>To avoid subtle parsing problems like this, it is best to avoid spacing a binary operator asymetrically with a space on the left but not on the right.</p>
+<p>To avoid subtle parsing problems like this, it is best to avoid spacing a binary operator asymmetrically with a space on the left but not on the right.</p>
 
 </dd>
 <dt id="Space-between-specific-keywords-and-opening-paren"><b>Space between specific keywords and opening paren</b></dt>
 
 <p>A third optional item of information which can be given is an alphanumeric letter which is used to limit the selection further depending on the type of token immediately before the container. If given, it goes just before the container symbol. The possible letters are currently &#39;k&#39;, &#39;K&#39;, &#39;f&#39;, &#39;F&#39;, &#39;w&#39;, and &#39;W&#39;, with these meanings:</p>
 
-<pre><code> &#39;k&#39; matches if the previous nonblank token is a perl builtin keyword (such as &#39;if&#39;, &#39;while&#39;),
+<pre><code> &#39;k&#39; matches if the previous nonblank token is a perl built-in keyword (such as &#39;if&#39;, &#39;while&#39;),
  &#39;K&#39; matches if &#39;k&#39; does not, meaning that the previous token is not a keyword.
  &#39;f&#39; matches if the previous token is a function other than a keyword.
  &#39;F&#39; matches if &#39;f&#39; does not.
 <dt id="bal-n---break-after-labels-n"><b>bal=n, --break-after-labels=n</b></dt>
 <dd>
 
-<p>This flag controls whether or not a line break occurs after a label. There are three possible valuse for <b>n</b>:</p>
+<p>This flag controls whether or not a line break occurs after a label. There are three possible values for <b>n</b>:</p>
 
-<pre><code>  -bal=0  break if there is a break in the input [DEFAULt]
+<pre><code>  -bal=0  break if there is a break in the input [DEFAULT]
   -bal=1  always break after a label
   -bal=2  never break after a label</code></pre>
 
 
 <p>It is possible to be more specific in matching parentheses by preceding them with a letter. The possible letters are &#39;k&#39;, &#39;K&#39;, &#39;f&#39;, &#39;F&#39;, &#39;w&#39;, and &#39;W&#39;, with these meanings (these are the same as used in the <b>--weld-nested-exclusion-list</b> and <b>--line-up-parentheses-exclusion-list</b> parameters):</p>
 
-<pre><code> &#39;k&#39; matches if the previous nonblank token is a perl builtin keyword (such as &#39;if&#39;, &#39;while&#39;),
+<pre><code> &#39;k&#39; matches if the previous nonblank token is a perl built-in keyword (such as &#39;if&#39;, &#39;while&#39;),
  &#39;K&#39; matches if &#39;k&#39; does not, meaning that the previous token is not a keyword.
  &#39;f&#39; matches if the previous token is a function other than a keyword.
  &#39;F&#39; matches if &#39;f&#39; does not.
 
 <p><b>-kgbi</b> or <b>--keyword-group-blanks-inside</b> controls the insertion of blank lines between the first and last statement of the entire group. If there is a continuous run of a single statement type with more than the minimum threshold number (as specified with <b>-kgbs=s</b>) then this switch causes a blank line be inserted between this subgroup and the others. In the example above this happened between the <b>use</b> and <b>my</b> statements.</p>
 
-<p><b>-kgbd</b> or <b>--keyword-group-blanks-delete</b> controls the deletion of any blank lines that exist in the the group when it is first scanned. When statements are initially scanned, any existing blank lines are included in the collection. Any such orignial blank lines will be deleted before any other insertions are made when the parameter <b>-kgbd</b> is set. The default is not to do this, <b>-nkgbd</b>.</p>
+<p><b>-kgbd</b> or <b>--keyword-group-blanks-delete</b> controls the deletion of any blank lines that exist in the the group when it is first scanned. When statements are initially scanned, any existing blank lines are included in the collection. Any such original blank lines will be deleted before any other insertions are made when the parameter <b>-kgbd</b> is set. The default is not to do this, <b>-nkgbd</b>.</p>
 
 <p><b>-kgbr=n</b> or <b>--keyword-group-blanks-repeat-count=n</b> specifies <b>n</b>, the maximum number of times this logic will be applied to any file. The special value <b>n=0</b> is the same as n=infinity which means it will be applied to an entire script [Default]. A value <b>n=1</b> could be used to make it apply just one time for example. This might be useful for adjusting just the <b>use</b> statements in the top part of a module for example.</p>
 
 <dt id="Completely-turning-off-vertical-alignment-with--novalign"><b>Completely turning off vertical alignment with -novalign</b></dt>
 <dd>
 
-<p>The default is to use vertical alignment, but bertical alignment can be completely turned of with the <b>-novalign</b> flag.</p>
+<p>The default is to use vertical alignment, but vertical alignment can be completely turned of with the <b>-novalign</b> flag.</p>
 
 <p>A lower level of control of vertical alignment is possible with three parameters <b>-vc</b>, <b>-vsc</b>, and <b>-vbc</b>. These independently control alignment of code, side comments and block comments. They are described in the next section.</p>
 
 <dt id="Controlling-side-comment-alignment-with---valign-side-comments-or--vsc"><b>Controlling side comment alignment with --valign-side-comments or -vsc</b></dt>
 <dd>
 
-<p>The <b>-vsc</b> flag enables alignment of side comments and is enabled by default. If side comment aligment is disabled with <b>-nvsc</b> they will appear at a fixed space from the preceding code token. The default is <b>-vsc</b></p>
+<p>The <b>-vsc</b> flag enables alignment of side comments and is enabled by default. If side comment alignment is disabled with <b>-nvsc</b> they will appear at a fixed space from the preceding code token. The default is <b>-vsc</b></p>
 
 </dd>
 <dt id="Controlling-block-comment-alignment-with---valign-block-comments-or--vbc"><b>Controlling block comment alignment with --valign-block-comments or -vbc</b></dt>
 <p>More detailed control of alignment types is available with these two parameters. Most of the vertical alignments in typical programs occur at one of the tokens &#39;,&#39;, &#39;=&#39;, and &#39;=&gt;&#39;, but many other alignments are possible and are given in the following list:</p>
 
 <pre><code>  = **= += *= &amp;= &lt;&lt;= &amp;&amp;= -= /= |= &gt;&gt;= ||= //= .= %= ^= x=
-  { ( ? : , ; =&gt; &amp;&amp; || ~~ !~~ =~ !~ // &lt;=&gt; -&gt;
+  { ( ? : , ; =&gt; &amp;&amp; || ~~ !~~ =~ !~ // &lt;=&gt; -&gt; q
   if unless and or err for foreach while until</code></pre>
 
-<p>These alignments are all enabled by default, but they can be selectively disabled by including one or more of these tokens in the space-separated list <b>valign-exclusion-list=s</b>. For example, the following would prevent alignment at <b>=</b> and <b>if</b>:</p>
+<p>These alignment types correspond to perl symbols, operators and keywords except for &#39;q&#39;, which refers to the special case of alignment in a &#39;use&#39; statement of qw quotes and empty parens.</p>
+
+<p>They are all enabled by default, but they can be selectively disabled by including one or more of these tokens in the space-separated list <b>valign-exclusion-list=s</b>. For example, the following would prevent alignment at <b>=</b> and <b>if</b>:</p>
 
 <pre><code>  --valign-exclusion-list=&#39;= if&#39;</code></pre>
 
-<p>If it is simpler to specify only the token types which are to be aligned, then include the types which are to be aligned in the list of <b>--valign-inclusion-list</b>. You may leave the <b>valign-exclusion-list</b> undefined, or use the special symbol <b>*</b> for the exclusion list. For example, the following parameters enable alignment only at commas and &#39;fat commas&#39;:</p>
+<p>If it is simpler to specify only the token types which are to be aligned, then include the types which are to be aligned in the list of <b>--valign-inclusion-list</b>. In that case you may leave the <b>valign-exclusion-list</b> undefined, or use the special symbol <b>*</b> for the exclusion list. For example, the following parameters enable alignment only at commas and &#39;fat commas&#39;:</p>
 
 <pre><code>  --valign-inclusion-list=&#39;, =&gt;&#39;
   --valign-exclusion-list=&#39;*&#39;     ( this is optional and may be omitted )</code></pre>
 
 <p>Two commands which remove comments (but not pod) are: <b>-dbc</b> or <b>--delete-block-comments</b> and <b>-dsc</b> or <b>--delete-side-comments</b>. (Hanging side comments will be deleted with side comments here.)</p>
 
+<p>When side comments are deleted, any special control side comments for non-indenting braces will be retained unless they are deactivated with a <b>-nnib</b> flag.</p>
+
 <p>The negatives of these commands also work, and are the defaults. When block comments are deleted, any leading &#39;hash-bang&#39; will be retained. Also, if the <b>-x</b> flag is used, any system commands before a leading hash-bang will be retained (even if they are in the form of comments).</p>
 
 </dd>
 
 <p>These other locations are system-dependent, and may be displayed with the command <code>perltidy -dpro</code>. Under Unix systems, it will first look for an environment variable <b>PERLTIDY</b>. Then it will look for a <i>.perltidyrc</i> file in the home directory, and then for a system-wide file <i>/usr/local/etc/perltidyrc</i>, and then it will look for <i>/etc/perltidyrc</i>. Note that these last two system-wide files do not have a leading dot. Further system-dependent information will be found in the INSTALL file distributed with perltidy.</p>
 
-<p>Under Windows, perltidy will also search for a configuration file named perltidy.ini 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>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>
 
 
 <h1 id="VERSION">VERSION</h1>
 
-<p>This man page documents perltidy version 20220217</p>
+<p>This man page documents perltidy version 20220601</p>
 
 <h1 id="BUG-REPORTS">BUG REPORTS</h1>
 
index d6b31ad4e0d852a924dffe9e2bb4f26a4196ede5..4418ede619416cbb34eff47056afa815547ec963 100644 (file)
@@ -113,7 +113,7 @@ BEGIN {
     # Release version must be bumped, and it is probably past time for a
     # release anyway.
 
-    $VERSION = '20220217.04';
+    $VERSION = '20220601';
 }
 
 sub DESTROY {
index 06e7d83e6b2a37f8ed6adae4c13c7ed9abbdf3d4..1057cd8fb6306a9dced9ee115c577593d20418a6 100644 (file)
@@ -480,7 +480,7 @@ The module 'Perl::Tidy' comes with a binary 'perltidy' which is installed when t
 
 =head1 VERSION
 
-This man page documents Perl::Tidy version 20220217.04
+This man page documents Perl::Tidy version 20220601
 
 =head1 LICENSE
 
index 3c4e068a96cd0e68c9e23e4377107a5337cb4936..a9150cb221a45ce92be913e90760385bf51b46bb 100644 (file)
@@ -8,7 +8,7 @@ package Perl::Tidy::Debugger;
 use strict;
 use warnings;
 use English qw( -no_match_vars );
-our $VERSION = '20220217.04';
+our $VERSION = '20220601';
 
 use constant EMPTY_STRING => q{};
 use constant SPACE        => q{ };
index b58c07e8a3c7028e20e4ed5b6319fe9858e0012d..46ae3ba3f7b822a19fb75e8d34e5c25d5921937c 100644 (file)
@@ -7,7 +7,7 @@
 package Perl::Tidy::DevNull;
 use strict;
 use warnings;
-our $VERSION = '20220217.04';
+our $VERSION = '20220601';
 sub new   { my $self = shift; return bless {}, $self }
 sub print { return }
 sub close { return }
index fe40873e490b26660d9f2effbc73f0d51995641e..747653728a62e0ba206c0a010c69761eec04cab4 100644 (file)
@@ -21,7 +21,7 @@ package Perl::Tidy::Diagnostics;
 use strict;
 use warnings;
 use English qw( -no_match_vars );
-our $VERSION = '20220217.04';
+our $VERSION = '20220601';
 
 use constant EMPTY_STRING => q{};
 
index 9e497f62fd5aec4619b9ca9d083ee9d1ac63e6f0..1c351bceef547d0af428c380f442de414dec3c0e 100644 (file)
@@ -7,7 +7,7 @@
 package Perl::Tidy::FileWriter;
 use strict;
 use warnings;
-our $VERSION = '20220217.04';
+our $VERSION = '20220601';
 
 use constant DEVEL_MODE   => 0;
 use constant EMPTY_STRING => q{};
index 11adf2a6e3bc6ee2df813371f67508773aa7ff12..5933fd19c0cff38c07d00dc3893d2002c990e584 100644 (file)
@@ -52,7 +52,7 @@ use constant SPACE        => q{ };
 
 use Carp;
 use English qw( -no_match_vars );
-our $VERSION = '20220217.04';
+our $VERSION = '20220601';
 
 # The Tokenizer will be loaded with the Formatter
 ##use Perl::Tidy::Tokenizer;    # for is_keyword()
index b4827d3da26de535ce8034cfb90ff3386c19cc40..b63e0dd2f2ad01663c28b27c23cc09a2942e7a0c 100644 (file)
@@ -7,7 +7,7 @@
 package Perl::Tidy::HtmlWriter;
 use strict;
 use warnings;
-our $VERSION = '20220217.04';
+our $VERSION = '20220601';
 
 use English qw( -no_match_vars );
 use File::Basename;
index 90b16f04a77a74f48d556ba8abb9c574b44389d5..d2d2d3baedadab381e08f192b8e1989b05002d9f 100644 (file)
@@ -10,7 +10,7 @@ package Perl::Tidy::IOScalar;
 use strict;
 use warnings;
 use Carp;
-our $VERSION = '20220217.04';
+our $VERSION = '20220601';
 
 use constant EMPTY_STRING => q{};
 
index 8a1c7dfffa821b107edb5e97083ae908a3a12a3c..59c45ec5b12fb1ffc770e120ea5b5a43acce5e20 100644 (file)
@@ -14,7 +14,7 @@ package Perl::Tidy::IOScalarArray;
 use strict;
 use warnings;
 use Carp;
-our $VERSION = '20220217.04';
+our $VERSION = '20220601';
 
 sub AUTOLOAD {
 
index 0e7364c151912f03032616a431fec652ff581b84..6f091590d043d6ac35a5976f9bc6712da637f87c 100644 (file)
@@ -8,7 +8,7 @@
 package Perl::Tidy::IndentationItem;
 use strict;
 use warnings;
-our $VERSION = '20220217.04';
+our $VERSION = '20220601';
 
 BEGIN {
 
index 6b63165d103b1d406f5681d812f2e6246def64d8..773492c576c528ce42d3376f1329252b6d20ecca 100644 (file)
@@ -12,7 +12,7 @@
 package Perl::Tidy::LineBuffer;
 use strict;
 use warnings;
-our $VERSION = '20220217.04';
+our $VERSION = '20220601';
 
 sub AUTOLOAD {
 
index 7d6a576b01c298f75e41dccd3529c8094ab24b63..780573f08c9d5e12330d4a40494eaa1900af4a3c 100644 (file)
@@ -8,7 +8,7 @@
 package Perl::Tidy::LineSink;
 use strict;
 use warnings;
-our $VERSION = '20220217.04';
+our $VERSION = '20220601';
 
 sub AUTOLOAD {
 
index f0001fab83200d068a1cb48fbd4c6bdbb5430d24..a81058912f08deedfc690768ded14219ac98bd33 100644 (file)
@@ -8,7 +8,7 @@
 package Perl::Tidy::LineSource;
 use strict;
 use warnings;
-our $VERSION = '20220217.04';
+our $VERSION = '20220601';
 
 sub AUTOLOAD {
 
index 2830b833bf1c4cec48178c9562a1952546004565..bdd5aaac4c075f87a500115db6990489467a97a9 100644 (file)
@@ -7,7 +7,7 @@
 package Perl::Tidy::Logger;
 use strict;
 use warnings;
-our $VERSION = '20220217.04';
+our $VERSION = '20220601';
 use English qw( -no_match_vars );
 
 use constant EMPTY_STRING => q{};
index 91cc25c5b2deb8151ab84268d2d613159897040e..95f882550b89cd4164fbd2ada0892a135134dad1 100644 (file)
@@ -23,7 +23,7 @@ use strict;
 use warnings;
 use English qw( -no_match_vars );
 
-our $VERSION = '20220217.04';
+our $VERSION = '20220601';
 
 use constant DEVEL_MODE   => 0;
 use constant EMPTY_STRING => q{};
index 29a8530bb5e8b666aa75dd355d7ba6a221b91c26..1b87384cd12e528d38a8679795cd33eed71c0d81 100644 (file)
@@ -3,7 +3,7 @@ use strict;
 use warnings;
 use Carp;
 use English qw( -no_match_vars );
-our $VERSION = '20220217.04';
+our $VERSION = '20220601';
 use Perl::Tidy::VerticalAligner::Alignment;
 use Perl::Tidy::VerticalAligner::Line;
 
index 8bf14c186d08858486bc6c79a57e9507b7b4175b..5ecfa1c6c64af63558da9955dbdcef0e164b5f8b 100644 (file)
@@ -10,7 +10,7 @@ use warnings;
 
 { #<<< A non-indenting brace
 
-our $VERSION = '20220217.04';
+our $VERSION = '20220601';
 
 BEGIN {
 
index b0e471a6e63a58fa585e4b5fe6908f5008df462c..0b5063bc2e69c02ca27f51d25255e8cbb45dd2be 100644 (file)
@@ -8,7 +8,7 @@
 package Perl::Tidy::VerticalAligner::Line;
 use strict;
 use warnings;
-our $VERSION = '20220217.04';
+our $VERSION = '20220601';
 
 BEGIN {
 
index d1aceb26c7b8fc7d6876209f9c4d535ee3d44ac8..80c18b46e3057acd299728a542807d0b3f5630ff 100644 (file)
@@ -51,6 +51,7 @@
 - *IMPORTANT:* Now untar the file (perhaps in /tmp) and take a look at the
   contents.  Be sure it does not have unwanted files.
    - If necessary, remove MANIFEST, fix MANIFEST.SKIP and run make manifest again
+- run 'cpants-lint.pl' on the .tar.gz and check results
 - Do test installs on several systems 
 - Upload Release to CPAN
 - Update CPAN tickets