Condition Coverage

blib/lib/PPI/Lexer.pm
Criterion Covered Total %
condition 148 189 78.3


and 3 conditions

line !l l&&!r l&&r condition
175 0 0 16264 defined $source and not ref $source
410 743 238 891 $Next->isa("PPI::Token::Operator") and $Next->content eq "=>"
445 1 0 27 $Next->isa('PPI::Token::Structure') && $Next->content =~ /\A[{;]\z/
9570 27 1 "PPI::Statement::Scheduled" eq $class and not $Next->isa('PPI::Token::Structure') && $Next->content =~ /\A[{;]\z/
455 6625 2965 7 $Token->content =~ /^(?:my|our|state)$/ and $Next->isa("PPI::Token::Word")
9590 0 7 $Token->content =~ /^(?:my|our|state)$/ and $Next->isa("PPI::Token::Word") and $Next->content eq "sub"
481 3692 30 123 $class and $class->isa("PPI::Statement::Expression")
529 3000 167 28 $sclass and $sclass eq "PPI::Statement::Scheduled"
570 2235 0 1 $Next->isa("PPI::Token::Operator") and $Next->content eq "=>"
733 16704 7571 53 $Statement->schildren == 1 and $Statement->schild(0)->isa("PPI::Structure::Block")
780 0 967 74 $NextLast and $NextLast->isa("PPI::Token")
967 0 74 $NextLast and $NextLast->isa("PPI::Token") and $NextLast->isa("PPI::Token::Word")
967 0 74 $NextLast and $NextLast->isa("PPI::Token") and $NextLast->isa("PPI::Token::Word") and $NextLast->content eq "else"
793 202 562 203 $Token->isa("PPI::Token::Word") and $Token->content eq 'else' || $Token->content eq 'elsif'
817 282 13 38 $Token->isa("PPI::Token::Word") and $Token->content =~ /^(?:while|until|for|foreach)$/
826 82 3 210 $Token->isa("PPI::Token::Structure") and $Token->content eq "{"
834 872 435 371 $LastChild->isa("PPI::Structure") and $LastChild->braces eq "()"
841 0 0 371 $Token->isa('PPI::Token::Structure') && $Token->content eq '{'
846 13 0 127 $LastChild->isa("PPI::Token::Word") and $LastChild->content =~ /^for(?:each)?\z/
852 109 0 18 $Token->isa("PPI::Token::Structure") and $Token->content eq "("
868 0 0 0 $Token->isa('PPI::Token::Structure') && $Token->content eq '{'
883 0 0 0 $Token->isa('PPI::Token::Structure') && $Token->content eq '{'
888 653 614 6 $LastChild->isa("PPI::Token::Word") and $LastChild->content eq "continue"
893 0 0 6 $Token->isa('PPI::Token::Structure') && $Token->content eq '{'
905 416 0 6 &_INSTANCE($part[-2], "PPI::Token::Word") and $part[-2]->content eq "continue"
914 207 203 6 $Token->isa('PPI::Token::Word') && $Token->content eq 'continue'
928 0 33 116 $LastChild->isa("PPI::Token::Word") and $LastChild->content eq 'while' || $LastChild->content eq 'until'
939 0 0 149 $Token->isa('PPI::Token::Structure') && $Token->content eq '('
952 16 0 190 $Token->isa("PPI::Token::Structure") and $Token->content eq "("
959 83 2 192 $Token->isa("PPI::Token::Word") and ($STATEMENT_CLASSES{$Token->content} || '') eq "PPI::Statement::Variable"
9 0 42 $Token->isa("PPI::Token::Structure") and $Token->content eq "("
996 0 0 25 $Token->isa('PPI::Token::Structure') && $Token->content eq '{'
1040 5627 694 6 &_INSTANCE($Element, "PPI::Token::Operator") and $Element->content eq "->"
1060 1337 992 400 $Element->isa("PPI::Token::Operator") and $Element->content eq "->"
1069 1542 17 745 $Element->isa("PPI::Token::Symbol") and $Element->content =~ /^(?:\$|\@)/
1073 1497 13 49 $Element->isa("PPI::Token::Cast") and $Element->content =~ /^(?:\@|\%)/
1075 28 15 6 $prior and $prior->isa("PPI::Token::Operator")
43 4 2 $prior and $prior->isa("PPI::Token::Operator") and $prior->content eq "->"
1143 8352 0 2058 $content eq "->" and $Element->isa("PPI::Token::Operator")
1152 7450 282 541 $content =~ /^(?:\$|\@)/ and $Element->isa("PPI::Token::Symbol")
1156 7369 66 297 $Element->isa("PPI::Token::Cast") and $Element->content =~ /^(?:\@|\%|\*)/
1158 89 141 67 $prior and $prior->isa("PPI::Token::Operator")
230 64 3 $prior and $prior->isa("PPI::Token::Operator") and $prior->content eq "->"
1169 2 0 2 $prior->isa("PPI::Token::Cast") and $prior_content eq '@' || $prior_content eq '$'
1199 0 0 1 $Parent->schildren == 3 and $Parent->schild(2)->isa("PPI::Token::Number")
1212 0 491 161 $Parent->isa("PPI::Statement") and &_INSTANCE(scalar $Parent->parent, "PPI::Structure::List")
1221 15 52 94 $function and $function->content =~ /^(?:map|grep|sort|eval|do)$/
1225 15 46 6 $function and $function->content =~ /^(?:print|say)$/
1396 154720 1198 66488 ref $Parent eq "PPI::Statement" and my $first = $Parent->schild(0)
1398 66488 0 0 $first->isa("PPI::Token::Label") and not my $second = $Parent->schild(1)

or 2 conditions

line l !l condition
300 0 0 $errstr ||= "Unknown Tokenizer Error"
959 192 2 $STATEMENT_CLASSES{$Token->content} || ''
981 188 25 $STATEMENT_CLASSES{$LastChild->content} || ''

or 3 conditions

line l !l&&r !l&&!r condition
393 5294 2347 46760 $Parent->isa("PPI::Structure::List") or $Parent->isa("PPI::Structure::Constructor")
466 9553 16 21 not $Next->isa("PPI::Token::Operator") or $Next->content ne "=>"
517 7 3212 36962 $is_lexsub or $Token->content eq "sub"
605 3 3 28533 $Parent->isa("PPI::Structure::Given") or $Parent->isa("PPI::Structure::When")
644 17555 0 147580 $Token->__LEXER__closes or $Token->isa("PPI::Token::Separator")
793 149 151 465 $Token->content eq 'else' || $Token->content eq 'elsif'
852 18 3 106 $Token->isa("PPI::Token::Structure") and $Token->content eq "(" or $Token->isa("PPI::Token::QuoteLike::Words")
928 141 8 0 $LastChild->content eq 'while' || $LastChild->content eq 'until'
957 171 106 213 $LastChild->content eq "foreach" or $LastChild->content eq "for"
1169 1 1 0 $prior_content eq '@' || $prior_content eq '$'
1199 52 1 0 $Parent->schildren == 2 or $Parent->schildren == 3 and $Parent->schild(2)->isa("PPI::Token::Number")