Condition Coverage

blib/lib/PPI/Lexer.pm
Criterion Covered Total %
condition 146 189 77.2


and 3 conditions

line !l l&&!r l&&r condition
175 0 0 16208 defined $source and not ref $source
410 757 255 888 $Next->isa("PPI::Token::Operator") and $Next->content eq "=>"
445 1 0 27 $Next->isa('PPI::Token::Structure') && $Next->content =~ /\A[{;]\z/
9522 27 1 "PPI::Statement::Scheduled" eq $class and not $Next->isa('PPI::Token::Structure') && $Next->content =~ /\A[{;]\z/
455 6609 2933 7 $Token->content =~ /^(?:my|our|state)$/ and $Next->isa("PPI::Token::Word")
9542 0 7 $Token->content =~ /^(?:my|our|state)$/ and $Next->isa("PPI::Token::Word") and $Next->content eq "sub"
481 3676 30 123 $class and $class->isa("PPI::Statement::Expression")
529 3036 211 28 $sclass and $sclass eq "PPI::Statement::Scheduled"
570 2181 0 1 $Next->isa("PPI::Token::Operator") and $Next->content eq "=>"
733 16819 7623 48 $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 563 202 $Token->isa("PPI::Token::Word") and $Token->content eq 'else' || $Token->content eq 'elsif'
817 281 7 38 $Token->isa("PPI::Token::Word") and $Token->content =~ /^(?:while|until|for|foreach)$/
826 80 0 208 $Token->isa("PPI::Token::Structure") and $Token->content eq "{"
834 875 432 372 $LastChild->isa("PPI::Structure") and $LastChild->braces eq "()"
841 0 0 372 $Token->isa('PPI::Token::Structure') && $Token->content eq '{'
846 13 0 128 $LastChild->isa("PPI::Token::Word") and $LastChild->content =~ /^for(?:each)?\z/
852 110 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 651 616 6 $LastChild->isa("PPI::Token::Word") and $LastChild->content eq "continue"
893 0 0 6 $Token->isa('PPI::Token::Structure') && $Token->content eq '{'
905 413 0 6 &_INSTANCE($part[-2], "PPI::Token::Word") and $part[-2]->content eq "continue"
914 206 201 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 191 $Token->isa("PPI::Token::Structure") and $Token->content eq "("
959 83 2 193 $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 5829 635 6 &_INSTANCE($Element, "PPI::Token::Operator") and $Element->content eq "->"
1060 1365 1021 392 $Element->isa("PPI::Token::Operator") and $Element->content eq "->"
1069 1595 29 741 $Element->isa("PPI::Token::Symbol") and $Element->content =~ /^(?:\$|\@)/
1073 1570 11 43 $Element->isa("PPI::Token::Cast") and $Element->content =~ /^(?:\@|\%)/
1075 25 11 7 $prior and $prior->isa("PPI::Token::Operator")
36 5 2 $prior and $prior->isa("PPI::Token::Operator") and $prior->content eq "->"
1143 8412 0 2066 $content eq "->" and $Element->isa("PPI::Token::Operator")
1152 7511 287 535 $content =~ /^(?:\$|\@)/ and $Element->isa("PPI::Token::Symbol")
1156 7428 70 300 $Element->isa("PPI::Token::Cast") and $Element->content =~ /^(?:\@|\%|\*)/
1158 94 138 68 $prior and $prior->isa("PPI::Token::Operator")
232 65 3 $prior and $prior->isa("PPI::Token::Operator") and $prior->content eq "->"
1169 0 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 474 168 $Parent->isa("PPI::Statement") and &_INSTANCE(scalar $Parent->parent, "PPI::Structure::List")
1221 15 59 94 $function and $function->content =~ /^(?:map|grep|sort|eval|do)$/
1225 15 53 6 $function and $function->content =~ /^(?:print|say)$/
1396 154170 1216 65375 ref $Parent eq "PPI::Statement" and my $first = $Parent->schild(0)
1398 65375 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 193 2 $STATEMENT_CLASSES{$Token->content} || ''
981 189 25 $STATEMENT_CLASSES{$LastChild->content} || ''

or 3 conditions

line l !l&&r !l&&!r condition
393 5426 2426 46495 $Parent->isa("PPI::Structure::List") or $Parent->isa("PPI::Structure::Constructor")
466 9505 16 21 not $Next->isa("PPI::Token::Operator") or $Next->content ne "=>"
517 7 3292 36895 $is_lexsub or $Token->content eq "sub"
605 3 3 28389 $Parent->isa("PPI::Structure::Given") or $Parent->isa("PPI::Structure::When")
644 17600 0 146397 $Token->__LEXER__closes or $Token->isa("PPI::Token::Separator")
793 150 149 466 $Token->content eq 'else' || $Token->content eq 'elsif'
852 18 3 107 $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 107 214 $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")