Condition Coverage

blib/lib/PLS/Parser/Document.pm
Criterion Covered Total %
condition 141 364 38.7


and 2 conditions

line l !l condition
214 0 0 ref $results eq "ARRAY" and scalar @{$results;}
232 0 0 ref $results eq "ARRAY" and scalar @{$results;}
247 0 0 ref $results eq "ARRAY" and scalar @$results
313 0 0 ref $package eq "ARRAY" and scalar @{$package;}

and 3 conditions

line !l l&&!r l&&r condition
78 1 0 50 length $path and length $uri
139 0 0 0 not $list->isa("PLS::Parser::Element") and $list->type eq "PPI::Structure::List"
144 0 0 0 &blessed($word) and $word->isa("PLS::Parser::Element")
0 0 0 &blessed($word) and $word->isa("PLS::Parser::Element") and not $word->element->isa("PPI::Token::Word")
149 0 0 0 &blessed($word) and $word->isa("PLS::Parser::Element")
0 0 0 &blessed($word) and $word->isa("PLS::Parser::Element") and $word->element->isa("PPI::Token::Word")
157 0 0 0 scalar @parts and $parts[-1] ne "SUPER"
202 0 0 0 ref $this_files_package eq "PLS::Parser::Element::Package" and $this_files_package->name eq $package
218 0 0 0 ref $this_files_package eq "PLS::Parser::Element::Package" and $this_files_package->name eq $package
221 0 0 0 &blessed($found) and $found->isa("PLS::Parser::Element")
238 0 0 0 &blessed($found) and $found->isa("PLS::Parser::Element")
252 0 0 0 &blessed($found) and $found->isa("PLS::Parser::Element")
267 0 0 0 &blessed($found) and $found->isa("PLS::Parser::Element")
489 0 0 0 $element->type eq "PPI::Token::Operator" and $element->content =~ /^-[rwxoRWXOezsfdlpSbctugkTBMAC]$/
629 0 0 0 $child->isa("PPI::Statement::Variable") and &any(sub {
634 0 0 0 $child->isa("PPI::Statement::Include") and $child->type eq "use"
0 0 0 $child->isa("PPI::Statement::Include") and $child->type eq "use" and $child->pragma eq "vars"
654 0 0 0 $child->isa("PPI::Token::Word") and $child =~ /^my|our|local|state$/
656 0 0 0 &blessed(scalar $child->snext_sibling) and $child->snext_sibling->isa("PPI::Token::Symbol")
0 0 0 &blessed(scalar $child->snext_sibling) and $child->snext_sibling->isa("PPI::Token::Symbol") and $child->snext_sibling->symbol eq $variable
668 0 0 0 &blessed($condition) and $condition->isa("PPI::Structure::Condition")
675 0 0 0 $child->isa("PPI::Statement::Variable") and &any(sub {
687 0 0 0 &blessed($declaration) and $declaration->isa("PPI::Element")
843 0 0 0 $_[0]->isa("PPI::Statement::Sub") and not $_[0]->isa("PPI::Statement::Scheduled")
875 0 0 0 length $element->module && $element->module eq 'constant'
930 0 0 0 &blessed($element) and $element->isa("PPI::Statement::Variable")
1195 0 0 0 length $perltidyrc and -f $perltidyrc
0 0 0 length $perltidyrc and -f $perltidyrc and -r $perltidyrc
1204 0 0 0 $whole_file and $lines > $range->{'end'}{'line'}
1349 2 0 48 &blessed($document) and $document->isa("PPI::Document")
1414 3 0 42 &blessed($element) and $element->isa("PLS::Parser::Element")
3 36 6 &blessed($element) and $element->isa("PLS::Parser::Element") and $element->type eq "PPI::Token::Operator"
1416 0 0 0 &blessed(scalar $element->previous_sibling) && $element->previous_sibling->isa('PLS::Parser::Element') && $element->previous_sibling->element->isa('PPI::Token::Word') && $element->previous_sibling->name eq 'sub'
6 0 0 !&blessed(scalar $element->element->previous_sibling) || $element->element->previous_sibling->isa('PPI::Token::Whitespace') and not &blessed(scalar $element->previous_sibling) && $element->previous_sibling->isa('PLS::Parser::Element') && $element->previous_sibling->element->isa('PPI::Token::Word') && $element->previous_sibling->name eq 'sub'
6 0 0 !&blessed(scalar $element->element->previous_sibling) || $element->element->previous_sibling->isa('PPI::Token::Whitespace') and not &blessed(scalar $element->previous_sibling) && $element->previous_sibling->isa('PLS::Parser::Element') && $element->previous_sibling->element->isa('PPI::Token::Word') && $element->previous_sibling->name eq 'sub' and $element->content eq "-"
1436 8 0 37 &blessed($element) and $element->isa("PLS::Parser::Element")
8 19 18 &blessed($element) and $element->isa("PLS::Parser::Element") and $element->type eq 'PPI::Token::Quote::Double' || $element->type eq 'PPI::Token::Quote::Interpolate' || $element->type eq 'PPI::Token::QuoteLike::Regexp' || $element->type eq 'PPI::Token::QuoteLike::Command' || $element->element->isa('PPI::Token::Regexp')
1497 13 0 16 &blessed($element) and $element->isa("PLS::Parser::Element")
1501 11 2 0 &blessed($regexp) and $regexp->type eq 'PPI::Token::Regexp::Match' && $regexp->content eq 'm' || $regexp->type eq 'PPI::Token::Regexp::Substitute' && $regexp->content eq 's' || $regexp->type eq 'PPI::Token::Regexp::Transliterate' && ($regexp->content eq 'tr' || $regexp->content eq 'y')
1512 11 0 18 &blessed($element) and $element->isa("PLS::Parser::Element")
1521 10 0 1 &blessed($literal) and $literal->element->content eq "q"
9 0 1 &blessed($interpolate) and $interpolate->element->content eq "qq"
8 0 1 &blessed($qr) and $qr->element->content eq "qr"
7 0 1 &blessed($qw) and $qw->element->content eq "qw"
6 0 1 &blessed($qx) and $qx->element->content eq "qx"
1543 6 0 23 &blessed($element) and $element->isa("PLS::Parser::Element")
1548 5 0 1 &blessed($cast) and $cast->isa("PLS::Parser::Element")
1554 5 0 23 &blessed($element) && $element->isa('PLS::Parser::Element')
23 0 5 not &blessed($element) && $element->isa('PLS::Parser::Element') and &blessed($closest_operator)
23 0 5 not &blessed($element) && $element->isa('PLS::Parser::Element') and &blessed($closest_operator) and $closest_operator->isa("PLS::Parser::Element")
0 0 5 not &blessed($element) && $element->isa('PLS::Parser::Element') and &blessed($closest_operator) and $closest_operator->isa("PLS::Parser::Element") and $closest_operator->name eq "->"
0 0 5 not &blessed($element) && $element->isa('PLS::Parser::Element') and &blessed($closest_operator) and $closest_operator->isa("PLS::Parser::Element") and $closest_operator->name eq "->" and $closest_operator->lsp_column_number + length($closest_operator->content) == $character
1571 0 0 5 &blessed(scalar $closest_operator->previous_sibling) and $closest_operator->previous_sibling->isa("PLS::Parser::Element")
0 2 3 &blessed(scalar $closest_operator->previous_sibling) and $closest_operator->previous_sibling->isa("PLS::Parser::Element") and $closest_operator->previous_sibling->type eq "PPI::Token::Word"
0 0 1 &blessed(scalar $closest_operator->previous_sibling->element->previous_sibling) && $closest_operator->previous_sibling->element->previous_sibling->isa('PPI::Token::Operator') && $closest_operator->previous_sibling->element->previous_sibling eq '->'
2 1 2 &blessed(scalar $closest_operator->previous_sibling) and $closest_operator->previous_sibling->isa("PLS::Parser::Element") and $closest_operator->previous_sibling->type eq "PPI::Token::Word" and not &blessed(scalar $closest_operator->previous_sibling->element->previous_sibling) && $closest_operator->previous_sibling->element->previous_sibling->isa('PPI::Token::Operator') && $closest_operator->previous_sibling->element->previous_sibling eq '->'
1588 0 0 23 &blessed($element) and $element->isa("PLS::Parser::Element")
1604 17 1 1 $element->type eq "PPI::Token::Symbol" and $element->lsp_column_number == $character
18 0 1 $element->type eq "PPI::Token::Symbol" and $element->lsp_column_number == $character and &blessed(scalar $element->previous_sibling)
1 0 1 $element->type eq "PPI::Token::Symbol" and $element->lsp_column_number == $character and &blessed(scalar $element->previous_sibling) and $element->previous_sibling->isa("PLS::Parser::Element")
1611 0 0 19 &blessed($parent) and ref $parent eq "PLS::Parser::Element"
1612 10 0 9 $element->type eq "PPI::Token::Word" and &blessed($parent)
10 0 9 $element->type eq "PPI::Token::Word" and &blessed($parent) and $parent->isa("PLS::Parser::Element")
0 9 0 $element->type eq "PPI::Token::Word" and &blessed($parent) and $parent->isa("PLS::Parser::Element") and $parent->type eq "PPI::Structure::Subscript"
1615 10 4 5 $element->type eq "PPI::Token::Word" and &blessed(scalar $element->previous_sibling)
14 0 5 $element->type eq "PPI::Token::Word" and &blessed(scalar $element->previous_sibling) and $element->previous_sibling->isa("PLS::Parser::Element")
4 0 5 $element->type eq "PPI::Token::Word" and &blessed(scalar $element->previous_sibling) and $element->previous_sibling->isa("PLS::Parser::Element") and $element->previous_sibling->name eq "->"
1623 13 0 6 &blessed($closest_operator) and $closest_operator->isa("PLS::Parser::Element")
13 0 6 &blessed($closest_operator) and $closest_operator->isa("PLS::Parser::Element") and $closest_operator->name eq "->"
0 0 6 &blessed($closest_operator) and $closest_operator->isa("PLS::Parser::Element") and $closest_operator->name eq "->" and $element->type eq "PPI::Token::Word"
0 1 5 &blessed($closest_operator) and $closest_operator->isa("PLS::Parser::Element") and $closest_operator->name eq "->" and $element->type eq "PPI::Token::Word" and $element->parent->element == $closest_operator->parent->element
1641 0 0 5 &blessed(scalar $closest_operator->next_sibling) and $closest_operator->next_sibling->isa("PLS::Parser::Element")
0 0 5 &blessed(scalar $closest_operator->next_sibling) and $closest_operator->next_sibling->isa("PLS::Parser::Element") and $closest_operator->next_sibling->type eq "PPI::Token::Word"
0 0 5 &blessed(scalar $closest_operator->next_sibling) and $closest_operator->next_sibling->isa("PLS::Parser::Element") and $closest_operator->next_sibling->type eq "PPI::Token::Word" and $closest_operator->ppi_line_number == $closest_operator->next_sibling->ppi_line_number
1654 0 0 5 &blessed(scalar $closest_operator->previous_sibling) and $closest_operator->previous_sibling->isa("PLS::Parser::Element")
0 2 3 &blessed(scalar $closest_operator->previous_sibling) and $closest_operator->previous_sibling->isa("PLS::Parser::Element") and $closest_operator->previous_sibling->type eq "PPI::Token::Word"
2 3 0 &blessed(scalar $closest_operator->previous_sibling) and $closest_operator->previous_sibling->isa("PLS::Parser::Element") and $closest_operator->previous_sibling->type eq "PPI::Token::Word" and !(&blessed(scalar $closest_operator->previous_sibling->previous_sibling) && $closest_operator->previous_sibling->previous_sibling->isa('PLS::Parser::Element')) || $closest_operator->previous_sibling->previous_sibling->name ne '->'
1672 13 0 1 &blessed($closest_operator) and $closest_operator->isa("PLS::Parser::Element")
13 0 1 &blessed($closest_operator) and $closest_operator->isa("PLS::Parser::Element") and $closest_operator->name eq "->"
0 0 1 &blessed($closest_operator) and $closest_operator->isa("PLS::Parser::Element") and $closest_operator->name eq "->" and &blessed(scalar $closest_operator->previous_sibling)
0 0 1 &blessed($closest_operator) and $closest_operator->isa("PLS::Parser::Element") and $closest_operator->name eq "->" and &blessed(scalar $closest_operator->previous_sibling) and $closest_operator->previous_sibling->isa("PLS::Parser::Element")
0 1 0 &blessed($closest_operator) and $closest_operator->isa("PLS::Parser::Element") and $closest_operator->name eq "->" and &blessed(scalar $closest_operator->previous_sibling) and $closest_operator->previous_sibling->isa("PLS::Parser::Element") and $closest_operator->previous_sibling->element == $element->element
1689 14 0 0 $element->name eq ":" and &blessed(scalar $element->previous_sibling)
14 0 0 $element->name eq ":" and &blessed(scalar $element->previous_sibling) and $element->previous_sibling->isa("PLS::Parser::Element")
0 0 0 $element->name eq ":" and &blessed(scalar $element->previous_sibling) and $element->previous_sibling->isa("PLS::Parser::Element") and $element->previous_sibling->type eq 'PPI::Token::Word' || $element->previous_sibling->type eq 'PPI::Token::Label'
0 0 0 $element->name eq ":" and &blessed(scalar $element->previous_sibling) and $element->previous_sibling->isa("PLS::Parser::Element") and $element->previous_sibling->type eq 'PPI::Token::Word' || $element->previous_sibling->type eq 'PPI::Token::Label' and !(&blessed(scalar $element->previous_sibling->previous_sibling) && $element->previous_sibling->previous_sibling->isa('PLS::Parser::Element')) || $element->previous_sibling->previous_sibling->name ne '->'
1720 0 0 14 &blessed(scalar $element->parent) and $element->parent->isa("PLS::Parser::Element")
0 14 0 &blessed(scalar $element->parent) and $element->parent->isa("PLS::Parser::Element") and $element->parent->element->isa("PPI::Statement::Sub")
1743 0 0 0 &blessed($list) && $list->isa('PLS::Parser::Element')
1749 0 0 0 &blessed($expr) and $expr->isa("PPI::Statement::Expression")

or 2 conditions

line l !l condition
1459 14 0 $1 // ""

or 3 conditions

line l !l&&r !l&&!r condition
139 0 0 0 not &blessed($list) or not $list->isa("PLS::Parser::Element") and $list->type eq "PPI::Structure::List"
384 0 0 0 $start > $column_number or $column_number > $end
622 0 0 0 $cursor->isa("PPI::Structure::Block") or $cursor->isa("PPI::Document")
1222 0 0 0 $error == 1 or length $stderr
1400 17 2 133 $_->type eq "PPI::Token::Word" or $_->type eq "PPI::Token::Label"
19 4 129 $_->type eq "PPI::Token::Word" or $_->type eq "PPI::Token::Label" or $_->type eq "PPI::Token::Symbol"
6 8 121 $_->type eq "PPI::Token::Word" or $_->type eq "PPI::Token::Label" or $_->type eq "PPI::Token::Symbol" or $_->type eq "PPI::Token::Magic"
12 4 117 $_->type eq "PPI::Token::Word" or $_->type eq "PPI::Token::Label" or $_->type eq "PPI::Token::Symbol" or $_->type eq "PPI::Token::Magic" or $_->type eq "PPI::Token::Quote::Double"
12 6 111 $_->type eq "PPI::Token::Word" or $_->type eq "PPI::Token::Label" or $_->type eq "PPI::Token::Symbol" or $_->type eq "PPI::Token::Magic" or $_->type eq "PPI::Token::Quote::Double" or $_->type eq "PPI::Token::Quote::Interpolate"
10 6 105 $_->type eq "PPI::Token::Word" or $_->type eq "PPI::Token::Label" or $_->type eq "PPI::Token::Symbol" or $_->type eq "PPI::Token::Magic" or $_->type eq "PPI::Token::Quote::Double" or $_->type eq "PPI::Token::Quote::Interpolate" or $_->type eq "PPI::Token::QuoteLike::Regexp"
12 6 99 $_->type eq "PPI::Token::Word" or $_->type eq "PPI::Token::Label" or $_->type eq "PPI::Token::Symbol" or $_->type eq "PPI::Token::Magic" or $_->type eq "PPI::Token::Quote::Double" or $_->type eq "PPI::Token::Quote::Interpolate" or $_->type eq "PPI::Token::QuoteLike::Regexp" or $_->type eq "PPI::Token::QuoteLike::Command"
1416 0 0 6 !&blessed(scalar $element->element->previous_sibling) || $element->element->previous_sibling->isa('PPI::Token::Whitespace')
1436 6 10 16 $element->type eq 'PPI::Token::Quote::Double' || $element->type eq 'PPI::Token::Quote::Interpolate' || $element->type eq 'PPI::Token::QuoteLike::Regexp' || $element->type eq 'PPI::Token::QuoteLike::Command' || $element->element->isa('PPI::Token::Regexp')
1453 14 0 5 $string =~ /^(q[qrx]|[ysm]|tr)(\S)/ or $string =~ m[^()(/)]
1501 1 0 0 $regexp->type eq 'PPI::Token::Regexp::Match' && $regexp->content eq 'm' || $regexp->type eq 'PPI::Token::Regexp::Substitute' && $regexp->content eq 's' || $regexp->type eq 'PPI::Token::Regexp::Transliterate' && ($regexp->content eq 'tr' || $regexp->content eq 'y')
1654 2 0 1 !(&blessed(scalar $closest_operator->previous_sibling->previous_sibling) && $closest_operator->previous_sibling->previous_sibling->isa('PLS::Parser::Element')) || $closest_operator->previous_sibling->previous_sibling->name ne '->'
1689 0 0 0 $element->previous_sibling->type eq 'PPI::Token::Word' || $element->previous_sibling->type eq 'PPI::Token::Label'
0 0 0 !(&blessed(scalar $element->previous_sibling->previous_sibling) && $element->previous_sibling->previous_sibling->isa('PLS::Parser::Element')) || $element->previous_sibling->previous_sibling->name ne '->'
1710 4 1 9 $element->type eq "PPI::Token::Word" or $element->type eq "PPI::Token::Label"
5 2 7 $element->type eq "PPI::Token::Word" or $element->type eq "PPI::Token::Label" or $element->element->isa("PPI::Token::Quote")
3 3 4 $element->type eq "PPI::Token::Word" or $element->type eq "PPI::Token::Label" or $element->element->isa("PPI::Token::Quote") or $element->element->isa("PPI::Token::QuoteLike")
5 2 2 $element->type eq "PPI::Token::Word" or $element->type eq "PPI::Token::Label" or $element->element->isa("PPI::Token::Quote") or $element->element->isa("PPI::Token::QuoteLike") or $element->element->isa("PPI::Token::Regexp")
1743 0 0 0 not &blessed($list) && $list->isa('PLS::Parser::Element') or $list->type ne "PPI::Structure::List"
1824 0 0 0 $child->isa('PPI::Statement::Include') || $child->isa('PPI::Token::Whitespace')
1834 0 0 0 $child->pragma eq "strict" or $child->pragma eq "warnings"
0 0 0 $child->pragma eq "parent" or $child->pragma eq "base"
1852 0 0 0 Module::CoreList::is_core($child->module) or &any(sub {
1895 0 0 0 $b->type cmp $a->type || $a->module cmp $b->module