Condition Coverage

blib/lib/PPI/Lexer.pm
Criterion Covered Total %
condition 147 189 77.7


and 3 conditions

line !l l&&!r l&&r condition
175 0 0 16213 defined $source and not ref $source
410 766 262 888 $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 6622 2968 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 3699 30 123 $class and $class->isa("PPI::Statement::Expression")
529 3040 211 28 $sclass and $sclass eq "PPI::Statement::Scheduled"
570 2185 0 1 $Next->isa("PPI::Token::Operator") and $Next->content eq "=>"
733 16833 7631 49 $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 278 11 38 $Token->isa("PPI::Token::Word") and $Token->content =~ /^(?:while|until|for|foreach)$/
826 77 2 210 $Token->isa("PPI::Token::Structure") and $Token->content eq "{"
834 878 433 373 $LastChild->isa("PPI::Structure") and $LastChild->braces eq "()"
841 0 0 373 $Token->isa('PPI::Token::Structure') && $Token->content eq '{'
846 13 0 129 $LastChild->isa("PPI::Token::Word") and $LastChild->content =~ /^for(?:each)?\z/
852 111 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 618 6 $LastChild->isa("PPI::Token::Word") and $LastChild->content eq "continue"
893 0 0 6 $Token->isa('PPI::Token::Structure') && $Token->content eq '{'
905 414 0 6 &_INSTANCE($part[-2], "PPI::Token::Word") and $part[-2]->content eq "continue"
914 207 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 192 $Token->isa("PPI::Token::Structure") and $Token->content eq "("
959 83 2 194 $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 5915 632 6 &_INSTANCE($Element, "PPI::Token::Operator") and $Element->content eq "->"
1060 1357 1013 399 $Element->isa("PPI::Token::Operator") and $Element->content eq "->"
1069 1576 27 745 $Element->isa("PPI::Token::Symbol") and $Element->content =~ /^(?:\$|\@)/
1073 1549 6 48 $Element->isa("PPI::Token::Cast") and $Element->content =~ /^(?:\@|\%)/
1075 27 17 4 $prior and $prior->isa("PPI::Token::Operator")
44 2 2 $prior and $prior->isa("PPI::Token::Operator") and $prior->content eq "->"
1143 8417 0 2066 $content eq "->" and $Element->isa("PPI::Token::Operator")
1152 7495 298 544 $content =~ /^(?:\$|\@)/ and $Element->isa("PPI::Token::Symbol")
1156 7413 81 299 $Element->isa("PPI::Token::Cast") and $Element->content =~ /^(?:\@|\%|\*)/
1158 90 143 66 $prior and $prior->isa("PPI::Token::Operator")
233 63 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 478 162 $Parent->isa("PPI::Statement") and &_INSTANCE(scalar $Parent->parent, "PPI::Structure::List")
1221 14 54 94 $function and $function->content =~ /^(?:map|grep|sort|eval|do)$/
1225 14 48 6 $function and $function->content =~ /^(?:print|say)$/
1396 155055 1223 65263 ref $Parent eq "PPI::Statement" and my $first = $Parent->schild(0)
1398 65263 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 194 2 $STATEMENT_CLASSES{$Token->content} || ''
981 190 25 $STATEMENT_CLASSES{$LastChild->content} || ''

or 3 conditions

line l !l&&r !l&&!r condition
393 5518 2379 46578 $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 3296 36948 $is_lexsub or $Token->content eq "sub"
605 3 3 28344 $Parent->isa("PPI::Structure::Given") or $Parent->isa("PPI::Structure::When")
644 17640 0 147002 $Token->__LEXER__closes or $Token->isa("PPI::Token::Separator")
793 150 149 466 $Token->content eq 'else' || $Token->content eq 'elsif'
852 18 3 108 $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 108 215 $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")