Branch Coverage

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


line true false branch
43 9 0 if $elem->content ne "eval"
45 0 0 unless my $evaluated = $elem->snext_sibling
48 0 0 if _is_returned($elem)
49 0 0 if _is_in_right_hand_side_of_assignment($elem)
50 0 0 if _is_in_postfix_expression($elem)
52 0 0 if _is_in_correct_position_in_a_condition_or_foreach_loop_collection($elem, $following)
57 0 0 if _scan_backwards_for_grep($elem)
59 0 0 if ($following and $following->isa("PPI::Token::Operator"))
60 0 0 if $BOOLEAN_OPERATORS{$following->content}
61 0 0 if "?" eq $following->content
74 0 0 unless ($previous)
84 0 0 if ($previous->isa("PPI::Token::Operator"))
85 0 0 if $previous->content =~ /= \Z/msx
86 0 0 if _is_effectively_a_comma($previous)
101 0 0 unless my $parent = $elem->parent
102 0 0 unless $parent->isa("PPI::Statement")
104 0 0 unless my $grandparent = $parent->parent
106 0 0 if ($grandparent->isa("PPI::Structure::Constructor") or $grandparent->isa("PPI::Structure::List"))
125 0 0 if ($parent->isa("PPI::Structure::Condition"))
136 0 0 if ($parent->isa("PPI::Structure::List") and my $parent_statement = $parent->statement)
140 0 0 if $parent_statement->isa("PPI::Statement::Compound") and $parent_statement->type eq "foreach"
145 0 0 if ($parent->isa("PPI::Structure::For"))
148 0 0 unless my $condition = $for_loop_components[$CONDITION_POSITION_IN_C_STYLE_FOR_LOOP]
166 0 0 &refaddr($elem) == &refaddr($level) ? :
170 0 0 if (_is_effectively_a_comma($cursor))
177 0 0 if $cursor
185 0 0 unless $statement
186 0 0 unless $statement->isa("PPI::Statement")
189 0 0 unless ($level and $level->isa('PPI::Structure::List') || $level->isa('PPI::Structure::Condition'))
208 0 0 unless $potential_ancestor
211 0 0 unless $cursor = $cursor->parent
226 0 0 if ($previous->isa("PPI::Token::Word") and $POSTFIX_OPERATORS{$previous->content})
235 0 0 unless my $parent = $current_base->parent
236 0 0 if ($parent->isa('PPI::Statement')) { }
237 0 0 if $parent->specialized
239 0 0 unless my $grandparent = $parent->parent
240 0 0 unless $grandparent->isa("PPI::Structure::List")
247 0 0 unless $current_base->isa("PPI::Structure::List")
263 0 0 if $elem->isa("PPI::Token::Word") and "grep" eq $elem->content
266 0 0 if $elem->isa("PPI::Token::Operator") and precedence_of($elem) >= $PRECEDENCE_OF_EQUALS
283 0 0 unless $elem