Branch Coverage

blib/lib/Perl/Critic/Policy/BuiltinFunctions/ProhibitStringyEval.pm
Criterion Covered Total %
branch 43 54 79.6


line true false branch
48 353 105 if $elem->content ne "eval"
49 2 103 unless is_function_call($elem)
52 2 101 unless $argument
53 2 99 if $argument->isa("PPI::Structure::Block")
55 40 59 if $self->{'_allow_includes'} and _string_eval_is_an_include($argument)
63 0 48 unless $eval_argument->isa("PPI::Token::Quote")
68 0 48 unless eval {
73 1 47 if @statements > $MAX_STATEMENTS
81 2 45 unless $structure =~ /
89 8 37 unless my $is_q = $eval_argument->isa("PPI::Token::Quote::Single")
93 22 67 if ($statement->isa('PPI::Statement::Package')) { }
45 22 elsif ($statement->isa('PPI::Statement::Include')) { }
94 0 22 unless _string_eval_accept_package($statement)
96 3 42 unless _string_eval_accept_include($statement, $is_q)
98 2 20 unless _string_eval_accept_follow_on($statement)
108 0 22 unless defined $package
109 0 22 unless $package->isa("PPI::Statement::Package")
110 0 22 unless $package->file_scoped
118 0 45 unless defined $include
119 0 45 unless $include->isa("PPI::Statement::Include")
120 1 44 if $include->type eq "no"
122 36 8 if ($is_single_quoted)
126 2 34 if $include->find("PPI::Token::Symbol")
135 0 22 unless $follow_on->isa("PPI::Statement")
139 0 22 if @follow_on_components > 2
140 2 20 unless $follow_on_components[0]->isa("PPI::Token::Number")
141 0 20 if @follow_on_components == 1