From: Steve Hancock Date: Mon, 22 Mar 2021 01:49:55 +0000 (-0700) Subject: Fix error message for multiple conflicting specifications in -wnxl X-Git-Tag: 20210402~11 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=2ef97a2e29b9599f6d4cbb9f3b105cc7b94a8f87;p=perltidy.git Fix error message for multiple conflicting specifications in -wnxl --- 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