Branch Coverage

blib/lib/Perl/Critic/Policy/ErrorHandling/RequireCheckingReturnValueOfEval.pm
Criterion Covered Total %
branch 70 82 85.3


line true false branch
43 271 113 if $elem->content ne "eval"
45 0 113 unless my $evaluated = $elem->snext_sibling
48 2 111 if _is_returned($elem)
49 22 89 if _is_in_right_hand_side_of_assignment($elem)
50 17 72 if _is_in_postfix_expression($elem)
52 28 44 if _is_in_correct_position_in_a_condition_or_foreach_loop_collection($elem, $following)
57 1 43 if _scan_backwards_for_grep($elem)
59 14 29 if ($following and $following->isa("PPI::Token::Operator"))
60 8 6 if $BOOLEAN_OPERATORS{$following->content}
61 2 4 if "?" eq $following->content
74 67 44 unless ($previous)
84 59 112 if ($previous->isa("PPI::Token::Operator"))
85 22 37 if $previous->content =~ /= \Z/msx
86 33 4 if _is_effectively_a_comma($previous)
101 0 151 unless my $parent = $elem->parent
102 0 151 unless $parent->isa("PPI::Statement")
104 0 151 unless my $grandparent = $parent->parent
106 62 89 if ($grandparent->isa("PPI::Structure::Constructor") or $grandparent->isa("PPI::Structure::List"))
125 26 222 if ($parent->isa("PPI::Structure::Condition"))
136 34 188 if ($parent->isa("PPI::Structure::List") and my $parent_statement = $parent->statement)
140 4 30 if $parent_statement->isa("PPI::Statement::Compound") and $parent_statement->type eq "foreach"
145 10 208 if ($parent->isa("PPI::Structure::For"))
148 0 10 unless my $condition = $for_loop_components[$CONDITION_POSITION_IN_C_STYLE_FOR_LOOP]
166 26 34 &refaddr($elem) == &refaddr($level) ? :
170 12 52 if (_is_effectively_a_comma($cursor))
177 8 4 if $cursor
185 0 52 unless $statement
186 0 52 unless $statement->isa("PPI::Statement")
189 18 18 unless ($level and $level->isa('PPI::Structure::List') || $level->isa('PPI::Structure::Condition'))
208 0 10 unless $potential_ancestor
211 4 30 unless $cursor = $cursor->parent
226 17 52 if ($previous->isa("PPI::Token::Word") and $POSTFIX_OPERATORS{$previous->content})
235 0 80 unless my $parent = $current_base->parent
236 80 0 if ($parent->isa('PPI::Statement')) { }
237 38 42 if $parent->specialized
239 0 42 unless my $grandparent = $parent->parent
240 34 8 unless $grandparent->isa("PPI::Structure::List")
247 0 8 unless $current_base->isa("PPI::Structure::List")
263 1 121 if $elem->isa("PPI::Token::Word") and "grep" eq $elem->content
266 23 98 if $elem->isa("PPI::Token::Operator") and precedence_of($elem) >= $PRECEDENCE_OF_EQUALS
283 4 111 unless $elem