Condition Coverage

blib/lib/PPI/Lexer.pm
Criterion Covered Total %
condition 158 206 76.7


and 3 conditions

line !l l&&!r l&&r condition
403 783 278 945 $Next->isa("PPI::Token::Operator") and $Next->content eq "=>"
428 65739 6 2 $content eq 'try' && +($self->{'features_stack'}[-1] || {})->{'try'}
443 1 0 27 $Next->isa('PPI::Token::Structure') && $Next->content =~ /\A[{;]\z/
9818 27 1 "PPI::Statement::Scheduled" eq $class and not $Next->isa('PPI::Token::Structure') && $Next->content =~ /\A[{;]\z/
453 6751 3087 7 $content =~ /^(?:my|our|state)\z/ and $Next->isa("PPI::Token::Word")
9838 0 7 $content =~ /^(?:my|our|state)\z/ and $Next->isa("PPI::Token::Word") and $Next->content eq "sub"
479 7403 30 123 $class and $class->isa("PPI::Statement::Expression")
527 3196 167 28 $sclass and $sclass eq "PPI::Statement::Scheduled"
568 2272 0 1 $Next->isa("PPI::Token::Operator") and $Next->content eq "=>"
749 17334 7824 47 $Statement->schildren == 1 and $Statement->schild(0)->isa("PPI::Structure::Block")
796 0 989 73 $NextLast and $NextLast->isa("PPI::Token")
989 0 73 $NextLast and $NextLast->isa("PPI::Token") and $NextLast->isa("PPI::Token::Word")
989 0 73 $NextLast and $NextLast->isa("PPI::Token") and $NextLast->isa("PPI::Token::Word") and $NextLast->content eq "else"
809 200 582 207 $Token->isa("PPI::Token::Word") and $Token->content eq 'else' || $Token->content eq 'elsif'
833 312 10 38 $Token->isa("PPI::Token::Word") and $Token->content =~ /^(?:while|until|for|foreach)$/
842 77 2 243 $Token->isa("PPI::Token::Structure") and $Token->content eq "{"
850 896 479 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 701 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 1329 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 458 0 6 &_INSTANCE($part[-2], "PPI::Token::Word") and $part[-2]->content eq "continue"
946 239 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 9455 715 11 &_INSTANCE($Element, "PPI::Token::Operator") and $Element->content eq "->"
1094 1374 1040 4060 $Element->isa("PPI::Token::Operator") and $Element->content eq "->"
1103 1647 22 732 $Element->isa("PPI::Token::Symbol") and $Element->content =~ /^(?:\$|\@)/
1107 1609 15 45 $Element->isa("PPI::Token::Cast") and $Element->content =~ /^(?:\@|\%)/
1109 25 13 7 $prior and $prior->isa("PPI::Token::Operator")
38 5 2 $prior and $prior->isa("PPI::Token::Operator") and $prior->content eq "->"
1177 8727 0 2111 $content eq "->" and $Element->isa("PPI::Token::Operator")
1186 7794 286 574 $content =~ /^(?:\$|\@)/ and $Element->isa("PPI::Token::Symbol")
1190 7700 59 321 $Element->isa("PPI::Token::Cast") and $Element->content =~ /^(?:\@|\%|\*)/
1192 98 147 76 $prior and $prior->isa("PPI::Token::Operator")
245 73 3 $prior and $prior->isa("PPI::Token::Operator") and $prior->content eq "->"
1203 2 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 479 172 $Parent->isa("PPI::Statement") and &_INSTANCE(scalar $Parent->parent, "PPI::Structure::List")
1255 17 61 94 $function and $function->content =~ /^(?:map|grep|sort|eval|do)$/
1259 17 55 6 $function and $function->content =~ /^(?:print|say)$/
1436 284122 1209 77136 ref $Parent eq "PPI::Statement" and my $first = $Parent->schild(0)
1438 77136 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 21172 8918 $self->{'features_stack'}[-1] || {}

or 3 conditions

line l !l&&r !l&&!r condition
386 9290 2519 54883 $Parent->isa("PPI::Structure::List") or $Parent->isa("PPI::Structure::Constructor")
464 9800 17 21 not $Next->isa("PPI::Token::Operator") or $Next->content ne "=>"
515 7 3408 45044 $is_lexsub or $content eq "sub"
603 3 3 32567 $Parent->isa("PPI::Structure::Given") or $Parent->isa("PPI::Structure::When")
656 25325 0 274969 $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")