Condition Coverage

blib/lib/App/perlimports/Document.pm
Criterion Covered Total %
condition 69 87 79.3


and 3 conditions

line !l l&&!r l&&r condition
401 45 359 4 not $isa_symbol and is_method_call($word)
404 81 317 6 not $isa_symbol || $word->statement && $word->statement->isa('PPI::Statement::Variable') and is_hash_key($word)
519 388 0 14 $child->isa("PPI::Structure::List") and not defined $imports
568 0 1 2 $words and scalar @$words == 1
1 1 1 $words and scalar @$words == 1 and $full_cast =~ /([\$\@\%])\{$words->[0]}/
618 1766 25 8 $_[1]->isa("PPI::Token::Quote") and not $_[1]->isa("PPI::Token::Quote::Single")
666 0 0 2 $cast->snext_sibling and $cast->snext_sibling->isa("PPI::Structure::Block")
723 0 0 11 $children[0] eq "sub" and $children[1]->isa("PPI::Token::Word")
748 0 53 1 exists $self->original_imports->{$module_name} and &any(sub {
769 2346 77 6 $_[1]->isa("PPI::Token::Symbol") and $_[1] =~ /\A[*\$\@\%]+$module_name::[a-zA-Z0-9_]/
1996 436 1 $_[1]->isa("PPI::Token::Word") and $_[1]->content =~ /\A$module_name::[a-zA-Z0-9_]*\z/ || $_[1]->content eq $module_name && $_[1]->snext_sibling eq '->'
881 39 2 1 not $self->_preserve_duplicates and exists $processed{$include->module}
930 1 5 9 $args[0] and $args[0] eq "()"
6 7 2 $args[0] and $args[0] eq "()" and not $self->_is_used_fully_qualified($include->module)
1098 0 0 0 defined $ENV{'HOME'} && -d path($ENV{'HOME'}, '.cache')

or 2 conditions

line l !l condition
371 36 15 $self->_ppi_selection->find(sub {
384 34 0 $self->ppi_document->find(sub {
456 41 0 $self->ppi_document->find(sub {
491 1 31 $self->ppi_document->find(sub {
551 4 10 $doc->find('PPI::Token::Cast') || []
565 3 0 $cast_as_doc->find('PPI::Token::Word') || []

or 3 conditions

line l !l&&r !l&&!r condition
326 31 0 1 not $pkgs or $pkgs->[0]->namespace eq "main"
404 45 36 323 $isa_symbol || $word->statement && $word->statement->isa('PPI::Statement::Variable')
523 43 8 351 $child->isa("PPI::Token::QuoteLike::Words") or $child->isa("PPI::Token::Quote::Single")
589 1 2 9 not $token->isa("PPI::Token::Quote") or $token->isa("PPI::Token::Quote::Single")
618 8 0 1791 $_[1]->isa("PPI::Token::Quote") and not $_[1]->isa("PPI::Token::Quote::Single") or $_[1]->isa("PPI::Token::Quote::Interpolate")
8 0 1791 $_[1]->isa("PPI::Token::Quote") and not $_[1]->isa("PPI::Token::Quote::Single") or $_[1]->isa("PPI::Token::Quote::Interpolate") or $_[1]->isa("PPI::Token::QuoteLike::Regexp")
628 1 0 8 $token->isa("PPI::Token::Regexp") or $token->isa("PPI::Token::QuoteLike::Regexp")
769 3 1 433 $_[1]->content =~ /\A$module_name::[a-zA-Z0-9_]*\z/ || $_[1]->content eq $module_name && $_[1]->snext_sibling eq '->'
804 4 7 56 exists $default_ignore{$element->module} || exists $self->_ignore_modules->{$element->module} || $self->_annotations->is_ignored($element) || &any(sub {
1084 5 2 0 $next->isa("PPI::Token::Whitespace") or $next->isa("PPI::Token::Comment")