From 068a28bc82d5231313080f39995a38b79293e2a0 Mon Sep 17 00:00:00 2001 From: Steve Hancock Date: Wed, 16 Jun 2021 14:52:22 -0700 Subject: [PATCH] Fix incorrect sub call --- lib/Perl/Tidy/Formatter.pm | 4 +++- local-docs/BugLog.pod | 9 +++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/lib/Perl/Tidy/Formatter.pm b/lib/Perl/Tidy/Formatter.pm index 3deeb241..e911b01b 100644 --- a/lib/Perl/Tidy/Formatter.pm +++ b/lib/Perl/Tidy/Formatter.pm @@ -6780,6 +6780,8 @@ sub weld_containers { # flags. my ($self) = @_; + $total_weld_count = 0; + return if ( $rOpts->{'indent-only'} ); return unless ($rOpts_add_newlines); @@ -8158,7 +8160,7 @@ sub weld_nested_quotes { # Check weld exclusion rules for outer container if ( !$do_not_weld ) { - my $is_leading = !$self->is_welded_left_at_K($Kouter_opening); + my $is_leading = !defined( $rK_weld_left->{$Kouter_opening} ); if ( $self->is_excluded_weld( $KK, $is_leading ) ) { if (DEBUG_WELD) { $Msg .= diff --git a/local-docs/BugLog.pod b/local-docs/BugLog.pod index 0f5e7299..ac3950db 100644 --- a/local-docs/BugLog.pod +++ b/local-docs/BugLog.pod @@ -2,6 +2,13 @@ =over 4 +=item B + +This fixes an incorrect call which could cause an incorrect weld. + +16 Jun 2021. + + =item B Added a new option '--code-skipping', requested in git #65, in which code @@ -9,6 +16,8 @@ between comment lines '#<>V' is passed verbatim to the output stream without error checking. It is simmilar to --format skipping but there is no error checking, and is useful for skipping an extended syntax. +16 Jun 2021. + =item B Perltidy was producing an error at nested print format blocks, -- 2.39.5