Branch Coverage

blib/lib/Perl/Critic/Policy/Variables/ProhibitLoopOnHash.pm
Criterion Covered Total %
branch 38 42 90.4


line true false branch
27 79 60 unless &first(sub {
41 6 54 if $elem->parent and $elem->parent->isa("PPI::Statement::Expression")
45 2 52 unless ($elem->snext_sibling)
53 1 1 if ($next eq "\\")
71 1 53 if (not $elem->snext_sibling and $elem->next_token)
77 1 0 if $elem->next_token
83 16 38 if ((my $scope = $elem->snext_sibling)->isa("PPI::Token::Word"))
84 14 2 if (&first(sub {
115 3 11 if $elem->isa("PPI::Token::Word")
123 1 53 unless my $topical = $elem->snext_sibling
128 21 32 if ($topical->isa("PPI::Token::Symbol"))
129 7 14 if ($topical->snext_sibling and $topical->snext_sibling->isa('PPI::Structure::List')) { }
133 0 7 unless $topical = $elem->snext_sibling
142 13 40 if _check_symbol_or_cast($topical)
146 30 10 if ($topical->isa("PPI::Structure::List"))
148 0 30 if @children > 1
151 30 0 if ((my $statement = $children[0])->isa("PPI::Statement"))
154 13 17 if _check_symbol_or_cast($statement_args[0])
167 54 13 unless $arg->isa("PPI::Token::Symbol") and $arg =~ /^%/msx or $arg->isa("PPI::Token::Cast") and $arg eq "%"
175 9 20 if ($arg->isa("PPI::Token::Cast") and $next_op->isa("PPI::Structure::Block"))
181 3 26 if $next_op and $next_op->isa("PPI::Token::Operator")