Branch Coverage

blib/lib/PPIx/Utils/Classification.pm
Criterion Covered Total %
branch 105 178 58.9


line true false branch
57 2 33 if (&blessed($elem) and $elem->isa('PPI::Statement::Sub'))
68 0 4 unless $elem
77 0 16 unless $elem
102 0 7 unless $elem
112 0 15 unless $elem
347 0 0 unless $elem
361 0 0 unless $name
368 0 20 unless $elem
376 0 20 unless $elem
379 8 12 if _is_followed_by_parens($elem)
383 0 12 unless $parent
385 0 12 unless $grandparent
386 2 10 if $grandparent->isa('PPI::Structure::Subscript')
391 0 10 unless $sib
392 0 10 if $sib->isa('PPI::Token::Operator') and $sib eq '=>'
399 0 15 unless $elem
401 0 15 unless $stmnt
402 15 0 unless $stmnt->isa('PPI::Statement::Include')
408 0 0 unless defined $value
415 0 14 unless $elem
418 0 14 unless $statement
421 12 2 unless $psib
429 12 18 unless $elem
436 0 15 unless $elem
443 0 15 unless $elem
451 0 15 unless $elem
453 0 15 unless $stmnt
454 15 0 unless $stmnt->isa('PPI::Statement::Package')
460 0 17 unless $elem
462 12 5 unless $sib
464 0 5 unless $stmnt
469 0 16 unless my $elem = shift()
471 1 15 if is_perl_bareword($elem)
472 0 15 if is_perl_filehandle($elem)
473 0 15 if is_package_declaration($elem)
474 0 15 if is_included_module_name($elem)
475 0 15 if is_method_call($elem)
476 0 15 if is_class_name($elem)
477 1 14 if is_subroutine_name($elem)
478 0 14 if is_label_pointer($elem)
479 0 14 if is_hash_key($elem)
488 0 0 if $token->sprevious_sibling
491 0 0 if ($parent)
492 0 0 if $parent->isa('PPI::Structure::List')
493 0 0 if $parent->isa('PPI::Structure::For')
494 0 0 if $parent->isa('PPI::Structure::Condition')
495 0 0 if $parent->isa('PPI::Structure::Constructor')
496 0 0 if $parent->isa('PPI::Structure::Subscript')
499 0 0 if ($grand_parent)
501 0 0 if $parent->isa('PPI::Structure::Block') and not $grand_parent->isa('PPI::Statement::Compound')
520 0 14 unless is_function_call($elem)
523 2 12 if (my $sib = $elem->sprevious_sibling)
524 2 0 if $sib
528 12 0 if (my $statement = $elem->statement)
537 77 13 unless $elem->isa('PPI::Token::Operator')
538 12 1 if $elem ne 'or' and $elem ne '||'
542 1 11 if $statement->find($or_operators)
545 11 0 if (my $parent = $elem->statement->parent)
548 0 11 if $parent->isa('PPI::Structure::Condition')
551 0 11 if $parent->isa('PPI::Structure::Constructor')
554 6 5 if ($parent->isa('PPI::Structure::List'))
555 1 5 if (my $uncle = $parent->sprevious_sibling)
556 1 0 if $uncle
562 7 3 if _is_fatal($elem)
659 0 10 unless $top->isa('PPI::Document')
662 2 8 unless $includes
665 0 8 if 'use' ne $include->type
667 2 6 if ('Fatal' eq $include->module) { }
2 4 elsif ('Fatal::Exception' eq $include->module) { }
4 0 elsif ('autodie' eq $include->pragma) { }
670 2 0 if $arg->[0]->isa('PPI::Token::Quote') and $elem eq $arg->[0]->string
677 2 0 if $arg->[0]->isa('PPI::Token::Quote') and $elem eq $arg->[0]->string
697 0 4 if ($first_arg and $first_arg->isa('PPI::Token::Number'))
699 3 1 if (@args) { }
706 2 2 if $builtins and $$builtins{$elem->content}
713 1 0 if $builtins and $$builtins{$elem->content}
726 1 28 unless $element_class
727 5 23 unless $element->isa('PPI::Statement')
737 1 15 unless $element_class
738 1 14 unless $element->isa('PPI::Statement')
744 0 0 unless my $element = shift()
746 0 0 unless &blessed($element)
765 1 15 unless $element
767 2 13 if $element->isa('PPI::Statement::Sub')
769 4 9 if (is_ppi_generic_statement($element))
772 3 1 if $first_element and $first_element->isa('PPI::Token::Word') and $first_element->content eq 'sub'
784 2 3 unless $element
785 0 3 if is_subroutine_declaration($element)
788 2 5 if is_subroutine_declaration($element)