From: Steve Hancock Date: Tue, 27 Oct 2020 13:34:09 +0000 (-0700) Subject: removed unnecessary if test X-Git-Tag: 20201001.03~34 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=cc828677d43d5a8070fbe5e28894b3367e76a7fc;p=perltidy.git removed unnecessary if test --- diff --git a/lib/Perl/Tidy/Tokenizer.pm b/lib/Perl/Tidy/Tokenizer.pm index 43f7cfb9..63e5900d 100644 --- a/lib/Perl/Tidy/Tokenizer.pm +++ b/lib/Perl/Tidy/Tokenizer.pm @@ -4554,9 +4554,6 @@ sub operator_expected { if ( $is_block_operator{$last_nonblank_token} ) { # something like $a = do { BLOCK } / 2; - # or this ? after a smartmatch anonynmous hash or array reference: - # qr/3/ ~~ ['1234'] ? 1 : 0; - # ^ $op_expected = OPERATOR; # block mode following } } @@ -4572,7 +4569,7 @@ sub operator_expected { # # qr/3/ ~~ ['1234'] ? 1 : 0; # map { $_ ~~ [ '0', '1' ] ? 'x' : 'o' } @a; - elsif ( $last_nonblank_type eq '}' && $last_nonblank_token eq '~~' ) { + elsif ( $last_nonblank_token eq '~~' ) { $op_expected = OPERATOR; }