Condition Coverage

blib/lib/PPI/Lexer.pm
Criterion Covered Total %
condition 156 207 75.3


and 3 conditions

line !l l&&!r l&&r condition
180 0 0 16293 defined $source and not ref $source
422 771 263 949 $Next->isa("PPI::Token::Operator") and $Next->content eq "=>"
462 1 0 27 $Next->isa('PPI::Token::Structure') && $Next->content =~ /\A[{;]\z/
9834 27 1 "PPI::Statement::Scheduled" eq $class and not $Next->isa('PPI::Token::Structure') && $Next->content =~ /\A[{;]\z/
472 6769 3085 7 $Token->content =~ /^(?:my|our|state)$/ and $Next->isa("PPI::Token::Word")
9854 0 7 $Token->content =~ /^(?:my|our|state)$/ and $Next->isa("PPI::Token::Word") and $Next->content eq "sub"
498 3730 30 123 $class and $class->isa("PPI::Statement::Expression")
546 3068 167 28 $sclass and $sclass eq "PPI::Statement::Scheduled"
587 2265 0 1 $Next->isa("PPI::Token::Operator") and $Next->content eq "=>"
750 16983 7714 46 $Statement->schildren == 1 and $Statement->schild(0)->isa("PPI::Structure::Block")
797 0 1000 72 $NextLast and $NextLast->isa("PPI::Token")
1000 0 72 $NextLast and $NextLast->isa("PPI::Token") and $NextLast->isa("PPI::Token::Word")
1000 0 72 $NextLast and $NextLast->isa("PPI::Token") and $NextLast->isa("PPI::Token::Word") and $NextLast->content eq "else"
810 204 581 215 $Token->isa("PPI::Token::Word") and $Token->content eq 'else' || $Token->content eq 'elsif'
834 319 11 38 $Token->isa("PPI::Token::Word") and $Token->content =~ /^(?:while|until|for|foreach)$/
843 84 4 242 $Token->isa("PPI::Token::Structure") and $Token->content eq "{"
851 889 477 383 $LastChild->isa("PPI::Structure") and $LastChild->braces eq "()"
858 0 0 383 $Token->isa('PPI::Token::Structure') && $Token->content eq '{'
863 13 0 127 $LastChild->isa("PPI::Token::Word") and $LastChild->content =~ /^for(?:each)?\z/
869 109 0 18 $Token->isa("PPI::Token::Structure") and $Token->content eq "("
885 0 0 0 $Token->isa('PPI::Token::Structure') && $Token->content eq '{'
900 0 0 0 $Token->isa('PPI::Token::Structure') && $Token->content eq '{'
905 696 630 6 $LastChild->isa("PPI::Token::Word") and $LastChild->content eq "continue"
910 0 0 6 $Token->isa('PPI::Token::Structure') && $Token->content eq '{'
913 1320 0 6 $type eq "try" and $LastChild->presumed_features->{'try'}
917 0 0 2 $NextLast and $NextLast->isa("PPI::Token")
0 0 2 $NextLast and $NextLast->isa("PPI::Token") and $NextLast->isa("PPI::Token::Word")
0 2 0 $NextLast and $NextLast->isa("PPI::Token") and $NextLast->isa("PPI::Token::Word") and $NextLast->content eq "catch"
923 0 0 2 $Token->isa("PPI::Token::Word") and $Token->content eq "catch"
938 456 0 6 &_INSTANCE($part[-2], "PPI::Token::Word") and $part[-2]->content eq "continue"
947 237 213 6 $Token->isa('PPI::Token::Word') && $Token->content eq 'continue'
961 0 35 124 $LastChild->isa("PPI::Token::Word") and $LastChild->content eq 'while' || $LastChild->content eq 'until'
972 0 0 159 $Token->isa('PPI::Token::Structure') && $Token->content eq '('
985 16 0 191 $Token->isa("PPI::Token::Structure") and $Token->content eq "("
992 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 "("
1029 0 0 25 $Token->isa('PPI::Token::Structure') && $Token->content eq '{'
1075 5784 705 10 &_INSTANCE($Element, "PPI::Token::Operator") and $Element->content eq "->"
1095 1351 1030 400 $Element->isa("PPI::Token::Operator") and $Element->content eq "->"
1104 1620 21 735 $Element->isa("PPI::Token::Symbol") and $Element->content =~ /^(?:\$|\@)/
1108 1581 18 42 $Element->isa("PPI::Token::Cast") and $Element->content =~ /^(?:\@|\%)/
1110 27 10 5 $prior and $prior->isa("PPI::Token::Operator")
37 3 2 $prior and $prior->isa("PPI::Token::Operator") and $prior->content eq "->"
1178 8589 0 2089 $content eq "->" and $Element->isa("PPI::Token::Operator")
1187 7666 273 579 $content =~ /^(?:\$|\@)/ and $Element->isa("PPI::Token::Symbol")
1191 7586 50 303 $Element->isa("PPI::Token::Cast") and $Element->content =~ /^(?:\@|\%|\*)/
1193 93 141 69 $prior and $prior->isa("PPI::Token::Operator")
234 66 3 $prior and $prior->isa("PPI::Token::Operator") and $prior->content eq "->"
1204 2 0 2 $prior->isa("PPI::Token::Cast") and $prior_content eq '@' || $prior_content eq '$'
1234 0 0 1 $Parent->schildren == 3 and $Parent->schild(2)->isa("PPI::Token::Number")
1247 0 462 165 $Parent->isa("PPI::Statement") and &_INSTANCE(scalar $Parent->parent, "PPI::Structure::List")
1256 14 57 94 $function and $function->content =~ /^(?:map|grep|sort|eval|do)$/
1260 14 51 6 $function and $function->content =~ /^(?:print|say)$/
1431 157962 1193 69101 ref $Parent eq "PPI::Statement" and my $first = $Parent->schild(0)
1433 69101 0 0 $first->isa("PPI::Token::Label") and not my $second = $Parent->schild(1)

or 2 conditions

line l !l condition
312 0 0 $errstr ||= "Unknown Tokenizer Error"
992 193 2 $STATEMENT_CLASSES{$Token->content} || ''
1014 189 25 $STATEMENT_CLASSES{$LastChild->content} || ''

or 3 conditions

line l !l&&r !l&&!r condition
405 5497 2502 47200 $Parent->isa("PPI::Structure::List") or $Parent->isa("PPI::Structure::Constructor")
447 19915 34335 0 $Parent->schild(-1) || $Parent
483 9817 16 21 not $Next->isa("PPI::Token::Operator") or $Next->content ne "=>"
534 7 3280 37332 $is_lexsub or $Token->content eq "sub"
622 3 3 28638 $Parent->isa("PPI::Structure::Given") or $Parent->isa("PPI::Structure::When")
661 17730 0 152593 $Token->__LEXER__closes or $Token->isa("PPI::Token::Separator")
810 147 163 486 $Token->content eq 'else' || $Token->content eq 'elsif'
869 18 3 106 $Token->isa("PPI::Token::Structure") and $Token->content eq "(" or $Token->isa("PPI::Token::QuoteLike::Words")
961 151 8 0 $LastChild->content eq 'while' || $LastChild->content eq 'until'
990 172 106 214 $LastChild->content eq "foreach" or $LastChild->content eq "for"
1204 1 1 0 $prior_content eq '@' || $prior_content eq '$'
1234 52 1 0 $Parent->schildren == 2 or $Parent->schildren == 3 and $Parent->schild(2)->isa("PPI::Token::Number")