]> git.donarmstrong.com Git - perltidy.git/commitdiff
removed unnecessary if test
authorSteve Hancock <perltidy@users.sourceforge.net>
Tue, 27 Oct 2020 13:34:09 +0000 (06:34 -0700)
committerSteve Hancock <perltidy@users.sourceforge.net>
Tue, 27 Oct 2020 13:34:09 +0000 (06:34 -0700)
lib/Perl/Tidy/Tokenizer.pm

index 43f7cfb90823da18c7c7e429955d2fad38545a0e..63e5900dcaebe4b0114ade5c3bb53c37d4ad72f2 100644 (file)
@@ -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;
         }