From 2ef97a2e29b9599f6d4cbb9f3b105cc7b94a8f87 Mon Sep 17 00:00:00 2001 From: Steve Hancock Date: Sun, 21 Mar 2021 18:49:55 -0700 Subject: [PATCH] Fix error message for multiple conflicting specifications in -wnxl --- lib/Perl/Tidy/Formatter.pm | 13 ++++++++----- local-docs/BugLog.pod | 9 ++++++++- 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/lib/Perl/Tidy/Formatter.pm b/lib/Perl/Tidy/Formatter.pm index d1cda185..9a20b468 100644 --- a/lib/Perl/Tidy/Formatter.pm +++ b/lib/Perl/Tidy/Formatter.pm @@ -1669,18 +1669,21 @@ sub initialize_weld_nested_exclusion_rules { next; } } + + my $err; if ( $pos eq '^' || $pos eq '*' ) { - if ( defined( $rflags->[0] ) && $rflags ne $select ) { - $msg1 .= " '$item_save'"; + if ( defined( $rflags->[0] ) && $rflags->[0] ne $select ) { + $err = 1; } $rflags->[0] = $select; } if ( $pos eq '.' || $pos eq '*' ) { - if ( defined( $rflags->[1] ) && $rflags ne $select ) { - $msg1 .= " '$item_save'"; + if ( defined( $rflags->[1] ) && $rflags->[1] ne $select ) { + $err = 1; } $rflags->[1] = $select; } + if ($err) { $msg2 .= " '$item_save'"; } } if ($msg1) { Warn(< + +There was an error in the coding for an error message which checks for +conflicting requests in the -wnxl parameter. + +Fixed 21 Mar 2021. + =item B This update fixes issue git #57, in which a warning flag was not getting zeroed on each new call to perltidy. -19 Mar 2021. +19 Mar 2021, b6d296a. =item B -- 2.39.5