]> git.donarmstrong.com Git - perltidy.git/commitdiff
bump version to 20230309.01 20230309.01
authorSteve Hancock <perltidy@users.sourceforge.net>
Mon, 13 Mar 2023 15:16:02 +0000 (08:16 -0700)
committerSteve Hancock <perltidy@users.sourceforge.net>
Mon, 13 Mar 2023 15:16:02 +0000 (08:16 -0700)
This has fixes for git #110 (missing docs) and git #115

24 files changed:
CHANGES.md
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

index eb36279f03e10d8d857390db3a2dc55610e1dfbd..6bffaf6c0bd9914b168ddfbcea07c7a6156cbcdd 100644 (file)
@@ -1,5 +1,17 @@
 # Perltidy Change Log
 
+## 2023 03 09.01
+
+    - Fixed git #115. In the two most recent CPAN releases, when the
+      Perl::Tidy module was called with the source pointing to a file,
+      but no destination specified, the output went to the standard
+      output instead of to a file with extension ``.tdy``, as it should
+      have.  This has been fixed.
+
+    - Fixed git #110, add missing documentation for new options
+      -cpb and -bfvt=n. These work in version 20230309 but the pod
+      documentation was missing and has been added.
+
 ## 2023 03 09
 
     - No significant bugs have been found since the last release to CPAN.
index 796b3e1dd2a497a7f360f9e5cba08da45e76d438..236493bb3bdb38ef6e7469118808dca49f66da79 100755 (executable)
@@ -5646,7 +5646,7 @@ The perltidy binary uses the Perl::Tidy module and is installed when that module
 
 =head1 VERSION
 
-This man page documents perltidy version 20230309
+This man page documents perltidy version 20230309.01
 
 =head1 BUG REPORTS
 
index 2911676ec1a9ce5d1091f42de6bb02d2b538cb3d..29ae0f967aaeca3e67a4a8461136581c77e274f1 100644 (file)
@@ -1,5 +1,18 @@
 <h1>Perltidy Change Log</h1>
 
+<h2>2023 03 09.01</h2>
+
+<pre><code>- Fixed git #115. In the two most recent CPAN releases, when the
+  Perl::Tidy module was called with the source pointing to a file,
+  but no destination specified, the output went to the standard
+  output instead of to a file with extension ``.tdy``, as it should
+  have.  This has been fixed.
+
+- Fixed git #110, add missing documentation for new options
+  -cpb and -bfvt=n. These work in version 20230309 but the pod
+  documentation was missing and has been added.
+</code></pre>
+
 <h2>2023 03 09</h2>
 
 <pre><code>- No significant bugs have been found since the last release to CPAN.
index 400318fd3d7d5b90e8f202ee51e121fa1fd4ce9b..d453160737bccf3586856bb8329ff796441aa069 100644 (file)
 
 <p>Parameters which control formatting may be passed in several ways: in a <i>.perltidyrc</i> configuration file, in the <b>perltidyrc</b> parameter, and in the <b>argv</b> parameter.</p>
 
-<p>The <b>-syn</b> (<b>--check-syntax</b>) flag may be used with all source and destination streams except for standard input and output. However data streams which are not associated with a filename will be copied to a temporary file before being passed to Perl. This use of temporary files can cause somewhat confusing output from Perl.</p>
-
 <p>If the <b>-pbp</b> style is used it will typically be necessary to also specify a <b>-nst</b> flag. This is necessary to turn off the <b>-st</b> flag contained in the <b>-pbp</b> parameter set which otherwise would direct the output stream to the standard output.</p>
 
 <h1 id="EXAMPLES">EXAMPLES</h1>
 
 <h1 id="VERSION">VERSION</h1>
 
-<p>This man page documents Perl::Tidy version 20230309</p>
+<p>This man page documents Perl::Tidy version 20230309.01</p>
 
 <h1 id="LICENSE">LICENSE</h1>
 
index b8fa37f4e3795de3e32f96583a49522be60acc55..b8d784e8ded1637a4f6939f0dcc711495475ab28 100644 (file)
 
 <p>A conflict occurs if both <b>-bl</b> and <b>-bar</b> are specified.</p>
 
+</dd>
+<dt id="cpb---cuddled-paren-brace"><b>-cpb</b>, <b>--cuddled-paren-brace</b></dt>
+<dd>
+
+<p>A related parameter, <b>--cuddled-paren-brace</b>, causes perltidy to join two lines which otherwise would be</p>
+
+<pre><code>      )
+    {</code></pre>
+
+<p>to be</p>
+
+<pre><code>    ) {</code></pre>
+
+<p>For example:</p>
+
+<pre><code>    # default
+    foreach my $dir (
+        &#39;05_lexer&#39;, &#39;07_token&#39;, &#39;08_regression&#39;, &#39;11_util&#39;,
+        &#39;13_data&#39;,  &#39;15_transform&#39;
+      )
+    {
+        ...
+    }
+
+    # perltidy -cpb
+    foreach my $dir (
+        &#39;05_lexer&#39;, &#39;07_token&#39;, &#39;08_regression&#39;, &#39;11_util&#39;,
+        &#39;13_data&#39;,  &#39;15_transform&#39;
+    ) {
+        ...;
+    }</code></pre>
+
 </dd>
 <dt id="otr---opening-token-right-and-related-flags"><b>-otr</b>, <b>--opening-token-right</b> and related flags</dt>
 <dd>
   -bbpi=1 outdent by one continuation level
   -bbpi=2 indent one full indentation level</code></pre>
 
+</dd>
+<dt id="bfvt-n---brace-follower-vertical-tightness-n"><b>-bfvt=n</b>, <b>--brace-follower-vertical-tightness=n</b></dt>
+<dd>
+
+<p>Some types of closing block braces, such as <b>eval</b>, may be followed by additional code. A line break may be inserted between such a closing brace and the following code depending on the parameter <b>n</b> and the length of the trailing code, as follows:</p>
+
+<p>If the trailing code fits on a single line, then</p>
+
+<pre><code>  -bfvt=0 Follow the input style regarding break/no-break
+  -bfvt=1 Follow the input style regarding break/no-break [Default]
+  -bfvt=2 Do not insert a line break</code></pre>
+
+<p>If the trailing code requires multiple lines, then</p>
+
+<pre><code>  -bfvt=0 Insert a line break
+  -bfvt=1 Insert a line break except for a cuddled block chain [Default]
+  -bfvt=2 Do not insert a line break</code></pre>
+
+<p>So the most compact code is achieved with <b>-bfvt=2</b>.</p>
+
+<p>Example (non-cuddled, multiple lines ):</p>
+
+<pre><code>    # -bfvt=0 or -bvft=1 [DEFAULT]
+    eval {
+        ( $line, $cond ) = $self-&gt;_normalize_if_elif($line);
+        1;
+    }
+      or die sprintf &quot;Error at line %d\nLine %d: %s\n%s&quot;,
+      ( $line_info-&gt;start_line_num() ) x 2, $line, $@;
+
+    # -bfvt=2
+    eval {
+        ( $line, $cond ) = $self-&gt;_normalize_if_elif($line);
+        1;
+    } or die sprintf &quot;Error at line %d\nLine %d: %s\n%s&quot;,
+      ( $line_info-&gt;start_line_num() ) x 2, $line, $@;</code></pre>
+
+<p>Example (cuddled, multiple lines):</p>
+
+<pre><code>    # -bfvt=0
+    eval {
+        #STUFF;
+        1;    # return true
+    }
+      or do {
+        ##handle error
+      };
+
+    # -bfvt=1 [DEFAULT] or -bfvt=2
+    eval {
+        #STUFF;
+        1;    # return true
+    } or do {
+        ##handle error
+    };</code></pre>
+
 </dd>
 </dl>
 
 
 <h1 id="VERSION">VERSION</h1>
 
-<p>This man page documents perltidy version 20230309</p>
+<p>This man page documents perltidy version 20230309.01</p>
 
 <h1 id="BUG-REPORTS">BUG REPORTS</h1>
 
index 9695ea4891cb2a5f1dc5840ba7aa442b0de66ac4..d5c345c44fbcc0434a10d02d2c79d83093c0efb8 100644 (file)
@@ -113,7 +113,7 @@ BEGIN {
     # then the Release version must be bumped, and it is probably past time for
     # a release anyway.
 
-    $VERSION = '20230309';
+    $VERSION = '20230309.01';
 } ## end BEGIN
 
 sub DESTROY {
index 66387640dacf6b5c5ee0ea6459fce41ccd9f75e5..5e04244b47f33334de911ed4dbdb911a2cac36ce 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
+This man page documents Perl::Tidy version 20230309.01
 
 =head1 LICENSE
 
index 457da0d53bbedc2d35266073a24ddd776faf8bf1..98215ac1e519f2931fa92b40dd849bf9720f84d0 100644 (file)
@@ -8,7 +8,7 @@ package Perl::Tidy::Debugger;
 use strict;
 use warnings;
 use English qw( -no_match_vars );
-our $VERSION = '20230309';
+our $VERSION = '20230309.01';
 
 use constant EMPTY_STRING => q{};
 use constant SPACE        => q{ };
index 7253a6bbfde83ee099327b63333513c06c386358..b6b28c24acf82bcde82571c5eac670ca8f40fb79 100644 (file)
@@ -7,7 +7,7 @@
 package Perl::Tidy::DevNull;
 use strict;
 use warnings;
-our $VERSION = '20230309';
+our $VERSION = '20230309.01';
 sub new   { my $self = shift; return bless {}, $self }
 sub print { return }
 sub close { return }
index 847a1f04baac1043b95c5ccf7a73e640b7c6008f..4d9b6b1906f646cd7566d9d5a920b0ed8987201b 100644 (file)
@@ -21,7 +21,7 @@ package Perl::Tidy::Diagnostics;
 use strict;
 use warnings;
 use English qw( -no_match_vars );
-our $VERSION = '20230309';
+our $VERSION = '20230309.01';
 
 use constant EMPTY_STRING => q{};
 
index 834d1adfac3eb7f097be8141ed90da7333eb9c7f..debc3760e650b6f63d37def234636b5dd7243e5d 100644 (file)
@@ -7,7 +7,7 @@
 package Perl::Tidy::FileWriter;
 use strict;
 use warnings;
-our $VERSION = '20230309';
+our $VERSION = '20230309.01';
 
 use constant DEVEL_MODE   => 0;
 use constant EMPTY_STRING => q{};
index d2f9f037209303f8b2d7fa5b454d709a5492a605..7a8638e482515bbf7ab667c944faf2ac8c8b9fe0 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';
+our $VERSION = '20230309.01';
 
 # The Tokenizer will be loaded with the Formatter
 ##use Perl::Tidy::Tokenizer;    # for is_keyword()
index 02acb00a9a321dfd069d544451aa4de3620855b6..d3adf1ffbeb7a4553b6a42d528bac43b37396efd 100644 (file)
@@ -7,7 +7,7 @@
 package Perl::Tidy::HtmlWriter;
 use strict;
 use warnings;
-our $VERSION = '20230309';
+our $VERSION = '20230309.01';
 
 use English qw( -no_match_vars );
 use File::Basename;
index 66b674b2e62b467d5dc27a648f64ee7d0d51a1e6..b69e4a1c98334673e02909e41c12ba3d5586ac9c 100644 (file)
@@ -10,7 +10,7 @@ package Perl::Tidy::IOScalar;
 use strict;
 use warnings;
 use Carp;
-our $VERSION = '20230309';
+our $VERSION = '20230309.01';
 
 use constant EMPTY_STRING => q{};
 
index 3894cc44e3498b8d1278d58068fbc88065b94b2a..a5ddc130224fe36f7c20c311796340de669b66a3 100644 (file)
@@ -14,7 +14,7 @@ package Perl::Tidy::IOScalarArray;
 use strict;
 use warnings;
 use Carp;
-our $VERSION = '20230309';
+our $VERSION = '20230309.01';
 
 sub AUTOLOAD {
 
index 55390821a4fde66deea640634f0faa1ab6b2ac05..a6d4f3e87ca268e4f8dd39433cffd59d64b265b1 100644 (file)
@@ -8,7 +8,7 @@
 package Perl::Tidy::IndentationItem;
 use strict;
 use warnings;
-our $VERSION = '20230309';
+our $VERSION = '20230309.01';
 
 BEGIN {
 
index 7665e37e16276f4c520a252ccba2dac55a1b6eab..1dc1ed2015aeac85d4f1f0fa9c498d90aa67125c 100644 (file)
@@ -12,7 +12,7 @@
 package Perl::Tidy::LineBuffer;
 use strict;
 use warnings;
-our $VERSION = '20230309';
+our $VERSION = '20230309.01';
 
 sub AUTOLOAD {
 
index 6516a9877e3c56d80c213f70bc40e59ac8d719f4..079258a620b91784d41633aa2356ca3f27da6b76 100644 (file)
@@ -8,7 +8,7 @@
 package Perl::Tidy::LineSink;
 use strict;
 use warnings;
-our $VERSION = '20230309';
+our $VERSION = '20230309.01';
 
 sub AUTOLOAD {
 
index 8bf97b91f383c87acfb278a71158053a8513c13c..b442e97df2573e1c9b564795ddc4c3b7074ad011 100644 (file)
@@ -9,7 +9,7 @@ package Perl::Tidy::LineSource;
 use strict;
 use warnings;
 use English qw( -no_match_vars );
-our $VERSION = '20230309';
+our $VERSION = '20230309.01';
 
 use constant DEVEL_MODE => 0;
 
index fa3f5284286f5f06bc1869199422f6b144ed8a12..e195ae4615ea73ded44fb27fde5081ce08fc3fcc 100644 (file)
@@ -8,7 +8,7 @@
 package Perl::Tidy::Logger;
 use strict;
 use warnings;
-our $VERSION = '20230309';
+our $VERSION = '20230309.01';
 use English qw( -no_match_vars );
 
 use constant DEVEL_MODE   => 0;
index 8d16dd2fdbffca6948225d48e2f83eebb6224fba..0c861a03296080d1f61f79b4c9ec89cdf5a75661 100644 (file)
@@ -23,7 +23,7 @@ use strict;
 use warnings;
 use English qw( -no_match_vars );
 
-our $VERSION = '20230309';
+our $VERSION = '20230309.01';
 
 use Perl::Tidy::LineBuffer;
 use Carp;
index f582c6a802c8186e67fe559f1c0b7096f3f0d919..29c631f5abc0fdf82791ebb6e7b7f1fa91722536 100644 (file)
@@ -3,7 +3,7 @@ use strict;
 use warnings;
 use Carp;
 use English qw( -no_match_vars );
-our $VERSION = '20230309';
+our $VERSION = '20230309.01';
 use Perl::Tidy::VerticalAligner::Alignment;
 use Perl::Tidy::VerticalAligner::Line;
 
index 50edd51a017568a479b82693aba3891b6de7ca37..9cdd15c6cf29d7bcfdfe7398a6439389f18d9f48 100644 (file)
@@ -10,7 +10,7 @@ use warnings;
 
 { #<<< A non-indenting brace
 
-our $VERSION = '20230309';
+our $VERSION = '20230309.01';
 
 sub new {
     my ( $class, $rarg ) = @_;
index a1994601faa5d52bcded36d7c2cdd027bcb4b4a1..c4924b73394e6c085607a40d6a4aba024d82fe7c 100644 (file)
@@ -10,7 +10,7 @@ package Perl::Tidy::VerticalAligner::Line;
 use strict;
 use warnings;
 use English qw( -no_match_vars );
-our $VERSION = '20230309';
+our $VERSION = '20230309.01';
 
 sub AUTOLOAD {