From 09cbadef98a46b508fb791236fc9f436748fb7e4 Mon Sep 17 00:00:00 2001 From: Steve Hancock Date: Tue, 9 Apr 2024 07:09:19 -0700 Subject: [PATCH] call dump_block_summary after respace_tokens sub respace tokens makes some essential data structures needed for future updates to dump_block_summary. --- lib/Perl/Tidy/Formatter.pm | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/lib/Perl/Tidy/Formatter.pm b/lib/Perl/Tidy/Formatter.pm index 7be5f95f..1000728d 100644 --- a/lib/Perl/Tidy/Formatter.pm +++ b/lib/Perl/Tidy/Formatter.pm @@ -6556,13 +6556,6 @@ Something may be wrong; formatting will be skipped. EOM } - # Dump any requested block summary data - if ( $rOpts->{'dump-block-summary'} ) { - if ($severe_error) { Exit(1) } - $self->dump_block_summary(); - Exit(0); - } - #---------------------------------------------------------------- # Output file verbatim if severe error or no formatting requested #---------------------------------------------------------------- @@ -6611,6 +6604,12 @@ EOM $self->find_multiline_qw($rqw_lines); } + # Dump any requested block summary data + if ( $rOpts->{'dump-block-summary'} ) { + $self->dump_block_summary(); + Exit(0); + } + # Dump variable usage info if requested if ( $rOpts->{'dump-unusual-variables'} ) { $self->dump_unusual_variables(); -- 2.39.5