Condition Coverage

blib/lib/PLS/Parser/Document.pm
Criterion Covered Total %
condition 138 352 39.2


and 2 conditions

line l !l condition
198 0 0 ref $results eq "ARRAY" and scalar @{$results;}
216 0 0 ref $results eq "ARRAY" and scalar @{$results;}
231 0 0 ref $results eq "ARRAY" and scalar @$results
297 0 0 ref $package eq "ARRAY" and scalar @{$package;}

and 3 conditions

line !l l&&!r l&&r condition
78 1 0 32 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")
186 0 0 0 ref $this_files_package eq "PLS::Parser::Element::Package" and $this_files_package->name eq $package
202 0 0 0 ref $this_files_package eq "PLS::Parser::Element::Package" and $this_files_package->name eq $package
205 0 0 0 &blessed($found) and $found->isa("PLS::Parser::Element")
222 0 0 0 &blessed($found) and $found->isa("PLS::Parser::Element")
236 0 0 0 &blessed($found) and $found->isa("PLS::Parser::Element")
251 0 0 0 &blessed($found) and $found->isa("PLS::Parser::Element")
473 0 0 0 $element->type eq "PPI::Token::Operator" and $element->content =~ /^-[rwxoRWXOezsfdlpSbctugkTBMAC]$/
613 0 0 0 $child->isa("PPI::Statement::Variable") and &any(sub {
618 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"
638 0 0 0 $child->isa("PPI::Token::Word") and $child =~ /^my|our|local|state$/
640 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
652 0 0 0 &blessed($condition) and $condition->isa("PPI::Structure::Condition")
659 0 0 0 $child->isa("PPI::Statement::Variable") and &any(sub {
671 0 0 0 &blessed($declaration) and $declaration->isa("PPI::Element")
827 0 0 0 $_[0]->isa("PPI::Statement::Sub") and not $_[0]->isa("PPI::Statement::Scheduled")
859 0 0 0 length $element->module && $element->module eq 'constant'
914 0 0 0 &blessed($element) and $element->isa("PPI::Statement::Variable")
1179 0 0 0 length $perltidyrc and -f $perltidyrc
0 0 0 length $perltidyrc and -f $perltidyrc and -r $perltidyrc
1188 0 0 0 $whole_file and $lines > $range->{'end'}{'line'}
1333 2 0 30 &blessed($document) and $document->isa("PPI::Document")
1398 3 0 24 &blessed($element) and $element->isa("PLS::Parser::Element")
3 20 4 &blessed($element) and $element->isa("PLS::Parser::Element") and $element->type eq "PPI::Token::Operator"
1400 4 0 0 !&blessed(scalar $element->element->previous_sibling) || $element->element->previous_sibling->isa('PPI::Token::Whitespace') and $element->content eq "-"
1404 7 0 20 &blessed($element) and $element->isa("PLS::Parser::Element")
7 18 2 &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')
1465 12 0 15 &blessed($element) and $element->isa("PLS::Parser::Element")
1469 10 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')
1480 10 0 17 &blessed($element) and $element->isa("PLS::Parser::Element")
1489 9 0 1 &blessed($literal) and $literal->element->content eq "q"
8 0 1 &blessed($interpolate) and $interpolate->element->content eq "qq"
7 0 1 &blessed($qr) and $qr->element->content eq "qr"
6 0 1 &blessed($qw) and $qw->element->content eq "qw"
5 0 1 &blessed($qx) and $qx->element->content eq "qx"
1511 5 0 22 &blessed($element) and $element->isa("PLS::Parser::Element")
1516 4 0 1 &blessed($cast) and $cast->isa("PLS::Parser::Element")
1522 4 0 22 &blessed($element) && $element->isa('PLS::Parser::Element')
22 0 4 not &blessed($element) && $element->isa('PLS::Parser::Element') and &blessed($closest_operator)
22 0 4 not &blessed($element) && $element->isa('PLS::Parser::Element') and &blessed($closest_operator) and $closest_operator->isa("PLS::Parser::Element")
0 0 4 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 4 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
1539 0 0 4 &blessed(scalar $closest_operator->previous_sibling) and $closest_operator->previous_sibling->isa("PLS::Parser::Element")
0 1 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 '->'
1 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 '->'
1556 0 0 22 &blessed($element) and $element->isa("PLS::Parser::Element")
1566 16 1 1 $element->type eq "PPI::Token::Symbol" and $element->lsp_column_number == $character
17 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")
1573 0 0 18 &blessed($parent) and ref $parent eq "PLS::Parser::Element"
1574 10 0 8 $element->type eq "PPI::Token::Word" and &blessed($parent)
10 0 8 $element->type eq "PPI::Token::Word" and &blessed($parent) and $parent->isa("PLS::Parser::Element")
0 8 0 $element->type eq "PPI::Token::Word" and &blessed($parent) and $parent->isa("PLS::Parser::Element") and $parent->type eq "PPI::Structure::Subscript"
1577 10 4 4 $element->type eq "PPI::Token::Word" and &blessed(scalar $element->previous_sibling)
14 0 4 $element->type eq "PPI::Token::Word" and &blessed(scalar $element->previous_sibling) and $element->previous_sibling->isa("PLS::Parser::Element")
4 0 4 $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 "->"
1585 13 0 5 &blessed($closest_operator) and $closest_operator->isa("PLS::Parser::Element")
13 0 5 &blessed($closest_operator) and $closest_operator->isa("PLS::Parser::Element") and $closest_operator->name eq "->"
0 0 5 &blessed($closest_operator) and $closest_operator->isa("PLS::Parser::Element") and $closest_operator->name eq "->" and $element->type eq "PPI::Token::Word"
0 1 4 &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
1603 0 0 4 &blessed(scalar $closest_operator->next_sibling) and $closest_operator->next_sibling->isa("PLS::Parser::Element")
0 0 4 &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 4 &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
1616 0 0 4 &blessed(scalar $closest_operator->previous_sibling) and $closest_operator->previous_sibling->isa("PLS::Parser::Element")
0 1 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"
1 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 '->'
1634 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
1651 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 '->'
1700 0 0 0 &blessed($list) && $list->isa('PLS::Parser::Element')
1706 0 0 0 &blessed($expr) and $expr->isa("PPI::Statement::Expression")

or 2 conditions

line l !l condition
1427 0 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"
368 0 0 0 $start > $column_number or $column_number > $end
606 0 0 0 $cursor->isa("PPI::Structure::Block") or $cursor->isa("PPI::Document")
1206 0 0 0 $error == 1 or length $stderr
1385 8 1 40 $_->type eq "PPI::Token::Word" or $_->type eq "PPI::Token::Label"
9 2 38 $_->type eq "PPI::Token::Word" or $_->type eq "PPI::Token::Label" or $_->type eq "PPI::Token::Symbol"
3 4 34 $_->type eq "PPI::Token::Word" or $_->type eq "PPI::Token::Label" or $_->type eq "PPI::Token::Symbol" or $_->type eq "PPI::Token::Magic"
6 4 30 $_->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::Operator"
8 0 30 $_->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::Operator" or $_->type eq "PPI::Token::Quote::Double"
4 1 29 $_->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::Operator" or $_->type eq "PPI::Token::Quote::Double" or $_->type eq "PPI::Token::Quote::Interpolate"
1 1 28 $_->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::Operator" or $_->type eq "PPI::Token::Quote::Double" or $_->type eq "PPI::Token::Quote::Interpolate" or $_->type eq "PPI::Token::QuoteLike::Regexp"
2 1 27 $_->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::Operator" 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"
1400 0 0 4 !&blessed(scalar $element->element->previous_sibling) || $element->element->previous_sibling->isa('PPI::Token::Whitespace')
1404 2 2 15 $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')
1421 0 0 5 $string =~ /^(q[qrx]|[ysm]|tr)(\S)/ or $string =~ m[^()(/)]
1469 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')
1616 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 '->'
1651 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 '->'
1672 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")
1700 0 0 0 not &blessed($list) && $list->isa('PLS::Parser::Element') or $list->type ne "PPI::Structure::List"
1781 0 0 0 $child->isa('PPI::Statement::Include') || $child->isa('PPI::Token::Whitespace')
1791 0 0 0 $child->pragma eq "strict" or $child->pragma eq "warnings"
0 0 0 $child->pragma eq "parent" or $child->pragma eq "base"
1809 0 0 0 Module::CoreList::is_core($child->module) or &any(sub {
1852 0 0 0 $b->type cmp $a->type || $a->module cmp $b->module