1 ##############################################################################
2 # $URL: http://perlcritic.tigris.org/svn/perlcritic/trunk/Perl-Critic/t/ValuesAndExpressions/ProhibitMixedBooleanOperators.run $
3 # $Date: 2008-03-16 17:40:45 -0500 (Sun, 16 Mar 2008) $
6 ##############################################################################
9 ## name High-precedence passing
13 next if ! $finished || $foo < $bar;
14 if( $foo && !$bar || $baz){ do_something() }
15 this() && !that() || the_other();
17 #-----------------------------------------------------------------------------
19 ## name Low-precedence passing
23 next if not $finished or $foo < $bar;
24 if( $foo and not $bar or $baz){ do_something() }
25 this() and not that() or the_other();
27 #-----------------------------------------------------------------------------
33 next if not $finished || $foo < $bar;
34 if( $foo && not $bar or $baz){ do_something() }
35 this() and ! that() or the_other();
37 #-----------------------------------------------------------------------------
39 ## name High-precedence with low precedence self-equals
47 #-----------------------------------------------------------------------------
49 ## name Mixed booleans in same statement, but different expressions
53 # See http://rt.cpan.org/Ticket/Display.html?id=27637
54 ok( ! 1, 'values are URLs' ) or diag 'never happens';
56 #-----------------------------------------------------------------------------
58 ## name Mixed booleans in code blocks
68 ##############################################################################
71 # cperl-indent-level: 4
73 # indent-tabs-mode: nil
74 # c-indentation-style: bsd
76 # ex: set ts=8 sts=4 sw=4 tw=78 ft=perl expandtab shiftround :