Branch Coverage

blib/lib/Perl/Critic/Policy/ValuesAndExpressions/NotWithCompare.pm
Criterion Covered Total %
branch 63 68 92.6


line true false branch
63 182 117 if ($bang_elem->content ne '!')
69 23 94 if (my $prev = $bang_elem->sprevious_sibling)
70 21 2 if ($prev->isa('PPI::Token::Operator'))
72 15 6 unless ($op_andor{$op})
83 0 251 unless $elem
84 20 231 unless $elem = $elem->snext_sibling
87 6 225 if ($elem->isa('PPI::Token::Cast'))
94 60 165 if ($elem->isa('PPI::Token::Symbol'))
96 7 53 if ($elem->content =~ /^&/)
97 6 1 if (my $after = $elem->snext_sibling)
98 2 4 if ($after->isa('PPI::Structure::List'))
109 112 53 if ($elem->isa('PPI::Token::Operator'))
112 1 79 if ($state eq 'postfix' and $op_postfix{$op})
115 4 107 if ($state eq 'prefix' and $op eq '<')
123 18 89 if ($precedence > $stop_precedence)
126 2 87 if ($op eq '==' || $op eq '!=' and _snext_is_bang($elem))
129 10 77 if ($op eq '->')
130 10 0 if (my $method = $elem->snext_sibling)
133 10 0 if (my $after = $method->snext_sibling)
134 9 1 if ($after->isa('PPI::Token::Operator'))
137 1 0 if ($after->isa('PPI::Structure::List'))
147 49 25 if ($seen_precedence <= $precedence and $is_bad_precedence{$precedence})
158 24 29 if ($elem->isa('PPI::Token::Word'))
161 0 24 if ($post_control{$word})
164 5 19 if (is_perl_builtin_with_no_arguments($word))
172 5 14 if (exists $constants->{$word})
180 2 12 unless my $next = $elem->snext_sibling
183 3 9 if ($next->isa('PPI::Structure::List'))
190 3 6 if (is_perl_builtin($word))
194 5 1 if ($next->isa('PPI::Token::Operator'))
196 4 1 if ($op eq '<')
197 2 2 if (_next_gt($next))
230 6 10 if ($elem->isa('PPI::Token::Operator') and $elem eq '>')
243 6 6 unless ($elem->isa('PPI::Token::Cast'))