From: Steve Hancock <perltidy@users.sourceforge.net>
Date: Sat, 3 Dec 2022 01:53:40 +0000 (-0800)
Subject: bump version to 20221112.01
X-Git-Tag: 20221112.01^0
X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=b6007df9addec29bb1a3f78e24ad68e54e446862;p=perltidy.git

bump version to 20221112.01
---

diff --git a/CHANGES.md b/CHANGES.md
index 55cf8e3b..70ba95e3 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -1,5 +1,10 @@
 # Perltidy Change Log
 
+## 2022 11 12.01
+
+    - Added option -dbs, or --dump-block-summary, to dump summary
+      information about code blocks in a file to standard output.
+
 ## 2022 11 12
 
     - Fix rt #145095, undef warning in Perl before 5.12. Version 20221112 is
diff --git a/bin/perltidy b/bin/perltidy
index a9239bfb..f5870e2c 100755
--- a/bin/perltidy
+++ b/bin/perltidy
@@ -5427,7 +5427,7 @@ The perltidy binary uses the Perl::Tidy module and is installed when that module
 
 =head1 VERSION
 
-This man page documents perltidy version 20221112
+This man page documents perltidy version 20221112.01
 
 =head1 BUG REPORTS
 
diff --git a/lib/Perl/Tidy.pm b/lib/Perl/Tidy.pm
index 0b2a3783..83315cf6 100644
--- a/lib/Perl/Tidy.pm
+++ b/lib/Perl/Tidy.pm
@@ -113,7 +113,7 @@ BEGIN {
     # then the Release version must be bumped, and it is probably past time for
     # a release anyway.
 
-    $VERSION = '20221112';
+    $VERSION = '20221112.01';
 }
 
 sub DESTROY {
@@ -844,6 +844,17 @@ EOM
         Exit(0);
     }
 
+    # --dump-block-summary requires one filename in the arg list.
+    # This is a safety precaution in case a user accidentally adds -dbs to the
+    # command line parameters and is expecting formatted output to stdout.
+    # Another precaution, added elsewhere, is to  ignore -dbs in a .perltidyrc
+    my $numf = @Arg_files;
+    if ( $rOpts->{'dump-block-summary'} && $numf != 1 ) {
+        Die(<<EOM);
+--dump-block-summary expects 1 filename in the arg list but saw $numf filenames
+EOM
+    }
+
     #----------------------------------------
     # check parameters and their interactions
     #----------------------------------------
@@ -4084,6 +4095,7 @@ EOM
                     dump-token-types
                     dump-want-left-space
                     dump-want-right-space
+                    dump-block-summary
                     help
                     stylesheet
                     version
diff --git a/lib/Perl/Tidy.pod b/lib/Perl/Tidy.pod
index ae5381d1..338ebed5 100644
--- a/lib/Perl/Tidy.pod
+++ b/lib/Perl/Tidy.pod
@@ -475,7 +475,7 @@ The module 'Perl::Tidy' comes with a binary 'perltidy' which is installed when t
 
 =head1 VERSION
 
-This man page documents Perl::Tidy version 20221112
+This man page documents Perl::Tidy version 20221112.01
 
 =head1 LICENSE
 
diff --git a/lib/Perl/Tidy/Debugger.pm b/lib/Perl/Tidy/Debugger.pm
index caac624e..ca2cde94 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 = '20221112';
+our $VERSION = '20221112.01';
 
 use constant EMPTY_STRING => q{};
 use constant SPACE        => q{ };
diff --git a/lib/Perl/Tidy/DevNull.pm b/lib/Perl/Tidy/DevNull.pm
index 4716271d..0c73f7a4 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 = '20221112';
+our $VERSION = '20221112.01';
 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 a111ce8f..0d19e9b8 100644
--- a/lib/Perl/Tidy/Diagnostics.pm
+++ b/lib/Perl/Tidy/Diagnostics.pm
@@ -21,7 +21,7 @@ package Perl::Tidy::Diagnostics;
 use strict;
 use warnings;
 use English qw( -no_match_vars );
-our $VERSION = '20221112';
+our $VERSION = '20221112.01';
 
 use constant EMPTY_STRING => q{};
 
diff --git a/lib/Perl/Tidy/FileWriter.pm b/lib/Perl/Tidy/FileWriter.pm
index 8dd5c115..b5ffe822 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 = '20221112';
+our $VERSION = '20221112.01';
 
 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 e05f681c..6148a48c 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 = '20221112';
+our $VERSION = '20221112.01';
 
 # The Tokenizer will be loaded with the Formatter
 ##use Perl::Tidy::Tokenizer;    # for is_keyword()
@@ -6093,7 +6093,7 @@ sub dump_block_summary {
     foreach my $seqno ( keys %{$rblock_type_of_seqno} ) {
 
         my $type;
-        my $name       = "";
+        my $name       = EMPTY_STRING;
         my $block_type = $rblock_type_of_seqno->{$seqno};
         my $K_opening  = $K_opening_container->{$seqno};
         my $K_closing  = $K_closing_container->{$seqno};
@@ -6200,9 +6200,11 @@ EOM
     }
 
     #---------------------------
-    # Dump the results to STDOUt
+    # Dump the results to STDOUT
     #---------------------------
 
+    return unless %{$rselected_blocks};
+
     my $routput_lines;
     push @{$routput_lines},
       "file,line,type,name,line_count,level_start,level_diff,total_variation\n";
@@ -6220,13 +6222,6 @@ EOM
         push @{$routput_lines}, $line;
     }
 
-    push @{$routput_lines}, <<EOM;
-
-'Made with --dump-block-summary (or -dbs) with settings:
-'--dump-block-minimum-lines=$rOpts_dump_block_minimum_lines (or -dbml=$rOpts_dump_block_minimum_lines)
-'--dump-block-types=$rOpts_dump_block_types (or -dbt=$rOpts_dump_block_types)
-EOM
-
     foreach my $line ( @{$routput_lines} ) {
         print STDOUT $line;
     }
diff --git a/lib/Perl/Tidy/HtmlWriter.pm b/lib/Perl/Tidy/HtmlWriter.pm
index 62f69ebd..4d3c0418 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 = '20221112';
+our $VERSION = '20221112.01';
 
 use English qw( -no_match_vars );
 use File::Basename;
diff --git a/lib/Perl/Tidy/IOScalar.pm b/lib/Perl/Tidy/IOScalar.pm
index 983258ca..2162d90b 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 = '20221112';
+our $VERSION = '20221112.01';
 
 use constant EMPTY_STRING => q{};
 
diff --git a/lib/Perl/Tidy/IOScalarArray.pm b/lib/Perl/Tidy/IOScalarArray.pm
index f110fd70..16bded98 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 = '20221112';
+our $VERSION = '20221112.01';
 
 sub AUTOLOAD {
 
diff --git a/lib/Perl/Tidy/IndentationItem.pm b/lib/Perl/Tidy/IndentationItem.pm
index 2ccd8a1b..4b8b9851 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 = '20221112';
+our $VERSION = '20221112.01';
 
 BEGIN {
 
diff --git a/lib/Perl/Tidy/LineBuffer.pm b/lib/Perl/Tidy/LineBuffer.pm
index a59f9927..a379578a 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 = '20221112';
+our $VERSION = '20221112.01';
 
 sub AUTOLOAD {
 
diff --git a/lib/Perl/Tidy/LineSink.pm b/lib/Perl/Tidy/LineSink.pm
index 111d75b4..a7fd0018 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 = '20221112';
+our $VERSION = '20221112.01';
 
 sub AUTOLOAD {
 
diff --git a/lib/Perl/Tidy/LineSource.pm b/lib/Perl/Tidy/LineSource.pm
index 389020d1..d5f4b3a8 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 = '20221112';
+our $VERSION = '20221112.01';
 
 use constant DEVEL_MODE => 0;
 
diff --git a/lib/Perl/Tidy/Logger.pm b/lib/Perl/Tidy/Logger.pm
index a47a9eb4..2186818c 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 = '20221112';
+our $VERSION = '20221112.01';
 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 a2cb76fa..9e88c5c5 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 = '20221112';
+our $VERSION = '20221112.01';
 
 use Perl::Tidy::LineBuffer;
 use Carp;
diff --git a/lib/Perl/Tidy/VerticalAligner.pm b/lib/Perl/Tidy/VerticalAligner.pm
index 5704a90c..ee3b4b5c 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 = '20221112';
+our $VERSION = '20221112.01';
 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 209b2e50..3f6cd8a7 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 = '20221112';
+our $VERSION = '20221112.01';
 
 sub new {
     my ( $class, $rarg ) = @_;
diff --git a/lib/Perl/Tidy/VerticalAligner/Line.pm b/lib/Perl/Tidy/VerticalAligner/Line.pm
index 75fa3ac3..83805006 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 = '20221112';
+our $VERSION = '20221112.01';
 
 sub AUTOLOAD {