From: Steve Hancock Date: Tue, 9 Apr 2024 14:09:19 +0000 (-0700) Subject: call dump_block_summary after respace_tokens X-Git-Tag: 20240202.05~5 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=09cbadef98a46b508fb791236fc9f436748fb7e4;p=perltidy.git call dump_block_summary after respace_tokens sub respace tokens makes some essential data structures needed for future updates to dump_block_summary. --- 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();