Branch Coverage

blib/lib/Perl/Critic/StricterSubs/Utils.pm
Criterion Covered Total %
branch 81 100 81.0


line true false branch
51 2 10 unless $list_node->find("PPI::Token::Quote")
53 11 1 unless $list_node->find("PPI::Token::QuoteLike::Words")
63 0 0 unless @string_elems
92 24 4 unless $statements
104 33 23 $statements ? :
112 2826 62 unless $element->isa("PPI::Statement::Include")
115 5 57 unless $element->module
119 0 57 if $include_type ne "use" and $include_type ne "require"
129 0 10 @export_types ? :
136 8 12 unless $export_assignment
160 27 7 unless $sub_nodes
176 12 16 unless $includes_ref
203 6 22 unless defined $first_import_arg
212 0 37 unless defined $import_rqst
215 8 29 if ($import_rqst->isa('PPI::Token::QuoteLike::Words')) { }
7 22 elsif ($import_rqst->isa('PPI::Structure::List')) { }
11 11 elsif ($import_rqst->isa('PPI::Token::Quote')) { }
241 31 3 unless $constant_pragmas_ref
256 2 5 if (defined $sibling and $sibling->isa('PPI::Structure::Constructor')) { }
274 0 2 unless defined $block_or_list_node
276 0 2 unless my $fat_commas = $block_or_list_node->find(\&Perl::Critic::StricterSubs::Utils::_is_fat_comma)
307 5 28 unless $sub_calls_ref
316 265 1939 if ($elem->isa('PPI::Token::Word')) { }
89 1850 elsif ($elem->isa('PPI::Token::Symbol')) { }
318 92 173 if is_perl_builtin($elem)
319 26 147 if _smells_like_filehandle($elem)
320 5 142 if _smells_like_label($elem)
321 78 64 if is_function_call($elem)
326 29 60 if $elem->symbol_type eq "&"
375 0 173 unless $elem
383 77 96 if (my $left_sib = $elem->sprevious_sibling)
400 74 22 unless $enclosing_node->isa("PPI::Structure::List") or $enclosing_node->isa("PPI::Structure::Block")
403 1 21 if $enclosing_node->schild(0) != $expression
405 21 0 if (my $left_uncle = $enclosing_node->sprevious_sibling)
422 0 147 unless $elem
430 63 84 if (my $left_sib = $elem->sprevious_sibling)
447 78 6 unless $enclosing_node->isa("PPI::Structure::List")
449 0 6 if $enclosing_node->schild(0) != $expression
451 6 0 if (my $left_uncle = $enclosing_node->sprevious_sibling)
476 8 12 unless $export_assignments
479 0 12 if @{$export_assignments;} > 1
500 1056 26 unless $elem->isa("PPI::Token::Symbol")
501 13 13 if $elem ne $wanted_symbol
505 1 12 unless $next_sib->isa("PPI::Token::Operator")
506 0 12 if $next_sib ne "="
521 0 12 unless $snext_sibling
531 0 12 unless @left_hand_side
536 7 5 if $first_element->isa("PPI::Token::QuoteLike::Words")
539 5 0 if $first_element->isa("PPI::Structure::List")
542 0 0 if $first_element->isa("PPI::Token::Quote")