Condition Coverage

blib/lib/PPI/Lexer.pm
Criterion Covered Total %
condition 157 206 76.2


and 3 conditions

line !l l&&!r l&&r condition
403 761 263 947 $Next->isa("PPI::Token::Operator") and $Next->content eq "=>"
428 65813 6 2 $content eq 'try' && +($self->{'features_stack'}[-1] || {})->{'try'}
443 1 0 27 $Next->isa('PPI::Token::Structure') && $Next->content =~ /\A[{;]\z/
9843 27 1 "PPI::Statement::Scheduled" eq $class and not $Next->isa('PPI::Token::Structure') && $Next->content =~ /\A[{;]\z/
453 6754 3109 7 $content =~ /^(?:my|our|state)\z/ and $Next->isa("PPI::Token::Word")
9863 0 7 $content =~ /^(?:my|our|state)\z/ and $Next->isa("PPI::Token::Word") and $Next->content eq "sub"
479 7426 30 123 $class and $class->isa("PPI::Statement::Expression")
527 3197 167 28 $sclass and $sclass eq "PPI::Statement::Scheduled"
568 2290 0 1 $Next->isa("PPI::Token::Operator") and $Next->content eq "=>"
749 17341 7837 50 $Statement->schildren == 1 and $Statement->schild(0)->isa("PPI::Structure::Block")
796 0 991 73 $NextLast and $NextLast->isa("PPI::Token")
991 0 73 $NextLast and $NextLast->isa("PPI::Token") and $NextLast->isa("PPI::Token::Word")
991 0 73 $NextLast and $NextLast->isa("PPI::Token") and $NextLast->isa("PPI::Token::Word") and $NextLast->content eq "else"
809 202 582 207 $Token->isa("PPI::Token::Word") and $Token->content eq 'else' || $Token->content eq 'elsif'
833 318 14 38 $Token->isa("PPI::Token::Word") and $Token->content =~ /^(?:while|until|for|foreach)$/
842 84 5 243 $Token->isa("PPI::Token::Structure") and $Token->content eq "{"
850 896 480 384 $LastChild->isa("PPI::Structure") and $LastChild->braces eq "()"
857 0 0 384 $Token->isa('PPI::Token::Structure') && $Token->content eq '{'
862 13 0 130 $LastChild->isa("PPI::Token::Word") and $LastChild->content =~ /^for(?:each)?\z/
868 112 0 18 $Token->isa("PPI::Token::Structure") and $Token->content eq "("
884 0 0 0 $Token->isa('PPI::Token::Structure') && $Token->content eq '{'
899 0 0 0 $Token->isa('PPI::Token::Structure') && $Token->content eq '{'
904 702 634 6 $LastChild->isa("PPI::Token::Word") and $LastChild->content eq "continue"
909 0 0 6 $Token->isa('PPI::Token::Structure') && $Token->content eq '{'
912 1330 0 6 $type eq "try" and $LastChild->presumed_features->{'try'}
916 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"
922 0 0 2 $Token->isa("PPI::Token::Word") and $Token->content eq "catch"
937 459 0 6 &_INSTANCE($part[-2], "PPI::Token::Word") and $part[-2]->content eq "continue"
946 240 213 6 $Token->isa('PPI::Token::Word') && $Token->content eq 'continue'
960 0 35 122 $LastChild->isa("PPI::Token::Word") and $LastChild->content eq 'while' || $LastChild->content eq 'until'
971 0 0 157 $Token->isa('PPI::Token::Structure') && $Token->content eq '('
984 16 0 194 $Token->isa("PPI::Token::Structure") and $Token->content eq "("
991 83 2 196 $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 "("
1028 0 0 25 $Token->isa('PPI::Token::Structure') && $Token->content eq '{'
1074 9483 694 10 &_INSTANCE($Element, "PPI::Token::Operator") and $Element->content eq "->"
1094 1396 1080 4060 $Element->isa("PPI::Token::Operator") and $Element->content eq "->"
1103 1698 26 737 $Element->isa("PPI::Token::Symbol") and $Element->content =~ /^(?:\$|\@)/
1107 1666 9 49 $Element->isa("PPI::Token::Cast") and $Element->content =~ /^(?:\@|\%)/
1109 28 17 4 $prior and $prior->isa("PPI::Token::Operator")
45 2 2 $prior and $prior->isa("PPI::Token::Operator") and $prior->content eq "->"
1177 8741 0 2116 $content eq "->" and $Element->isa("PPI::Token::Operator")
1186 7778 306 584 $content =~ /^(?:\$|\@)/ and $Element->isa("PPI::Token::Symbol")
1190 7679 68 337 $Element->isa("PPI::Token::Cast") and $Element->content =~ /^(?:\@|\%|\*)/
1192 93 158 86 $prior and $prior->isa("PPI::Token::Operator")
251 83 3 $prior and $prior->isa("PPI::Token::Operator") and $prior->content eq "->"
1203 0 0 2 $prior->isa("PPI::Token::Cast") and $prior_content eq '@' || $prior_content eq '$'
1233 0 0 1 $Parent->schildren == 3 and $Parent->schild(2)->isa("PPI::Token::Number")
1246 0 480 179 $Parent->isa("PPI::Statement") and &_INSTANCE(scalar $Parent->parent, "PPI::Structure::List")
1255 17 68 94 $function and $function->content =~ /^(?:map|grep|sort|eval|do)$/
1259 17 62 6 $function and $function->content =~ /^(?:print|say)$/
1436 284275 1238 77527 ref $Parent eq "PPI::Statement" and my $first = $Parent->schild(0)
1438 77527 0 0 $first->isa("PPI::Token::Label") and not my $second = $Parent->schild(1)

or 2 conditions

line l !l condition
293 0 0 $errstr ||= "Unknown Tokenizer Error"
991 196 2 $STATEMENT_CLASSES{$Token->content} || ''
1013 192 25 $STATEMENT_CLASSES{$LastChild->content} || ''
1304 21209 8988 $self->{'features_stack'}[-1] || {}

or 3 conditions

line l !l&&r !l&&!r condition
386 9269 2577 54922 $Parent->isa("PPI::Structure::List") or $Parent->isa("PPI::Structure::Constructor")
464 9826 16 21 not $Next->isa("PPI::Token::Operator") or $Next->content ne "=>"
515 7 3409 45069 $is_lexsub or $content eq "sub"
603 3 3 32593 $Parent->isa("PPI::Structure::Given") or $Parent->isa("PPI::Structure::When")
656 25355 0 275447 $Token->__LEXER__closes or $Token->isa("PPI::Token::Separator")
809 146 157 486 $Token->content eq 'else' || $Token->content eq 'elsif'
868 18 3 109 $Token->isa("PPI::Token::Structure") and $Token->content eq "(" or $Token->isa("PPI::Token::QuoteLike::Words")
960 149 8 0 $LastChild->content eq 'while' || $LastChild->content eq 'until'
989 172 109 217 $LastChild->content eq "foreach" or $LastChild->content eq "for"
1203 1 1 0 $prior_content eq '@' || $prior_content eq '$'
1233 52 1 0 $Parent->schildren == 2 or $Parent->schildren == 3 and $Parent->schild(2)->isa("PPI::Token::Number")