]> git.donarmstrong.com Git - perltidy.git/commitdiff
bump version to 20221112.01 20221112.01
authorSteve Hancock <perltidy@users.sourceforge.net>
Sat, 3 Dec 2022 01:53:40 +0000 (17:53 -0800)
committerSteve Hancock <perltidy@users.sourceforge.net>
Sat, 3 Dec 2022 01:53:40 +0000 (17:53 -0800)
21 files changed:
CHANGES.md
bin/perltidy
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 55cf8e3b3a2964cdccd3fb537f3a0851dff45b59..70ba95e3206df2a2e1960036d28de9b66e62fc9e 100644 (file)
@@ -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
index a9239bfb413c022f86a20f4f07100d3cf88b6e2a..f5870e2c05c42e85306db937277d9f533b09163a 100755 (executable)
@@ -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
 
index 0b2a3783d2338c87b4f63bdf97cf557729b5532e..83315cf659284e05eb9d144f2cb7f0b84b7acfa9 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 = '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
index ae5381d14ed1731842a379a6965d4d009ce4fec5..338ebed5eb4081d491d9134e9a170947d14c207b 100644 (file)
@@ -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
 
index caac624ea39697be2b319d1c68b67477dbad7d9c..ca2cde94a94a3ae66d8bc3d8d79175ee5e814872 100644 (file)
@@ -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{ };
index 4716271d9779e163361c9ebfd1626fcf560ae92e..0c73f7a488addc9b7bac9c1ba9398e8e8e1a6439 100644 (file)
@@ -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 }
index a111ce8f1723e33837abf7bc7475cbfe0d790d92..0d19e9b8b1044c6ac113ee3555b50125bded6de5 100644 (file)
@@ -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{};
 
index 8dd5c1151d2325d9307135920c2085779a1bb6cf..b5ffe822c54e2886fc1bdc142ab7d4fcab2448af 100644 (file)
@@ -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{};
index e05f681c27d429cc330e103a555f2256def847f5..6148a48cde7098b92b2ee7d79292a6b3edb576b5 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 = '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;
     }
index 62f69ebd6d69a5121ef02176bf12c28a5efdc1cb..4d3c0418ee39c856a3433afe216cc85fb15775cd 100644 (file)
@@ -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;
index 983258cab9b2540602818f0bee670bbcc28beebb..2162d90b1526c82119f1b98c216388562c75b03e 100644 (file)
@@ -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{};
 
index f110fd70dbaa34138b09e3a9748db1552a05a83e..16bded981287d74b57f43cc5018bef207b773aa2 100644 (file)
@@ -14,7 +14,7 @@ package Perl::Tidy::IOScalarArray;
 use strict;
 use warnings;
 use Carp;
-our $VERSION = '20221112';
+our $VERSION = '20221112.01';
 
 sub AUTOLOAD {
 
index 2ccd8a1b48d7deb223c43c60a2d521c6a57a2ec0..4b8b9851a9836bcb22836f168bca10be9002e24b 100644 (file)
@@ -8,7 +8,7 @@
 package Perl::Tidy::IndentationItem;
 use strict;
 use warnings;
-our $VERSION = '20221112';
+our $VERSION = '20221112.01';
 
 BEGIN {
 
index a59f992748574bdc0a50d1ecaaeb0204c5b00e0b..a379578ac220a503891b01192dd6f9803a56f794 100644 (file)
@@ -12,7 +12,7 @@
 package Perl::Tidy::LineBuffer;
 use strict;
 use warnings;
-our $VERSION = '20221112';
+our $VERSION = '20221112.01';
 
 sub AUTOLOAD {
 
index 111d75b4fcc111989138974f2e4280504d7e42bf..a7fd0018acb1a48a0caa658f11c6a4fe57a20ac6 100644 (file)
@@ -8,7 +8,7 @@
 package Perl::Tidy::LineSink;
 use strict;
 use warnings;
-our $VERSION = '20221112';
+our $VERSION = '20221112.01';
 
 sub AUTOLOAD {
 
index 389020d1016dce741ed9f4c6d2ac47958e1cb234..d5f4b3a8d6f466647295b304f3d08b78b0cc5792 100644 (file)
@@ -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;
 
index a47a9eb4377fab881d8b170b467b1e88dc5e35e8..2186818ccbfecd11f525d1303c77340c473224cd 100644 (file)
@@ -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;
index a2cb76fab4639a69b850af3ebdc6d78a5ae13e95..9e88c5c5de11dadcfb677108f27e04dc2d806a01 100644 (file)
@@ -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;
index 5704a90c6e86a991d2dbe52d0c9f6d8909badbec..ee3b4b5cd2b9812944710c7116b4a2f35ef2b736 100644 (file)
@@ -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;
 
index 209b2e50b8b7ed61fb38d048072d9c56b8e2704a..3f6cd8a75a4477d13851956d11e3f8022a96d908 100644 (file)
@@ -10,7 +10,7 @@ use warnings;
 
 { #<<< A non-indenting brace
 
-our $VERSION = '20221112';
+our $VERSION = '20221112.01';
 
 sub new {
     my ( $class, $rarg ) = @_;
index 75fa3ac377221d91fd0625e4823016af78768051..838050067fd89c7987b25b8b8495966a4b2d5592 100644 (file)
@@ -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 {