Condition Coverage

blib/lib/PPI/Lexer.pm
Criterion Covered Total %
condition 162 212 76.4


and 3 conditions

line !l l&&!r l&&r condition
181 0 0 16293 defined $source and not ref $source
427 739 263 945 $Next->isa("PPI::Token::Operator") and $Next->content eq "=>"
452 54343 6 2 $content eq 'try' && +($self->{'features'}[-1] || {})->{'try'}
467 1 0 27 $Next->isa('PPI::Token::Structure') && $Next->content =~ /\A[{;]\z/
9855 27 1 "PPI::Statement::Scheduled" eq $class and not $Next->isa('PPI::Token::Structure') && $Next->content =~ /\A[{;]\z/
477 6775 3100 7 $content =~ /^(?:my|our|state)\z/ and $Next->isa("PPI::Token::Word")
9875 0 7 $content =~ /^(?:my|our|state)\z/ and $Next->isa("PPI::Token::Word") and $Next->content eq "sub"
503 3750 30 123 $class and $class->isa("PPI::Statement::Expression")
551 3072 167 28 $sclass and $sclass eq "PPI::Statement::Scheduled"
592 2265 0 1 $Next->isa("PPI::Token::Operator") and $Next->content eq "=>"
647 53378 3284 17 ref $statement eq "PPI::Statement::Include" and my $feat = $statement->feature_mods
771 16997 7710 44 $Statement->schildren == 1 and $Statement->schild(0)->isa("PPI::Structure::Block")
818 0 1004 72 $NextLast and $NextLast->isa("PPI::Token")
1004 0 72 $NextLast and $NextLast->isa("PPI::Token") and $NextLast->isa("PPI::Token::Word")
1004 0 72 $NextLast and $NextLast->isa("PPI::Token") and $NextLast->isa("PPI::Token::Word") and $NextLast->content eq "else"
831 204 585 215 $Token->isa("PPI::Token::Word") and $Token->content eq 'else' || $Token->content eq 'elsif'
855 310 8 38 $Token->isa("PPI::Token::Word") and $Token->content =~ /^(?:while|until|for|foreach)$/
864 74 4 240 $Token->isa("PPI::Token::Structure") and $Token->content eq "{"
872 887 475 381 $LastChild->isa("PPI::Structure") and $LastChild->braces eq "()"
879 0 0 381 $Token->isa('PPI::Token::Structure') && $Token->content eq '{'
884 13 0 127 $LastChild->isa("PPI::Token::Word") and $LastChild->content =~ /^for(?:each)?\z/
890 109 0 18 $Token->isa("PPI::Token::Structure") and $Token->content eq "("
906 0 0 0 $Token->isa('PPI::Token::Structure') && $Token->content eq '{'
921 0 0 0 $Token->isa('PPI::Token::Structure') && $Token->content eq '{'
926 694 628 6 $LastChild->isa("PPI::Token::Word") and $LastChild->content eq "continue"
931 0 0 6 $Token->isa('PPI::Token::Structure') && $Token->content eq '{'
934 1316 0 6 $type eq "try" and $LastChild->presumed_features->{'try'}
938 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"
944 0 0 2 $Token->isa("PPI::Token::Word") and $Token->content eq "catch"
959 454 0 6 &_INSTANCE($part[-2], "PPI::Token::Word") and $part[-2]->content eq "continue"
968 237 211 6 $Token->isa('PPI::Token::Word') && $Token->content eq 'continue'
982 0 35 122 $LastChild->isa("PPI::Token::Word") and $LastChild->content eq 'while' || $LastChild->content eq 'until'
993 0 0 157 $Token->isa('PPI::Token::Structure') && $Token->content eq '('
1006 16 0 191 $Token->isa("PPI::Token::Structure") and $Token->content eq "("
1013 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 "("
1050 0 0 25 $Token->isa('PPI::Token::Structure') && $Token->content eq '{'
1096 5778 689 10 &_INSTANCE($Element, "PPI::Token::Operator") and $Element->content eq "->"
1116 1362 1049 400 $Element->isa("PPI::Token::Operator") and $Element->content eq "->"
1125 1650 15 733 $Element->isa("PPI::Token::Symbol") and $Element->content =~ /^(?:\$|\@)/
1129 1608 11 46 $Element->isa("PPI::Token::Cast") and $Element->content =~ /^(?:\@|\%)/
1131 26 16 4 $prior and $prior->isa("PPI::Token::Operator")
42 2 2 $prior and $prior->isa("PPI::Token::Operator") and $prior->content eq "->"
1199 8612 0 2111 $content eq "->" and $Element->isa("PPI::Token::Operator")
1208 7674 292 573 $content =~ /^(?:\$|\@)/ and $Element->isa("PPI::Token::Symbol")
1212 7578 62 326 $Element->isa("PPI::Token::Cast") and $Element->content =~ /^(?:\@|\%|\*)/
1214 94 157 75 $prior and $prior->isa("PPI::Token::Operator")
251 72 3 $prior and $prior->isa("PPI::Token::Operator") and $prior->content eq "->"
1225 2 0 2 $prior->isa("PPI::Token::Cast") and $prior_content eq '@' || $prior_content eq '$'
1255 0 0 1 $Parent->schildren == 3 and $Parent->schild(2)->isa("PPI::Token::Number")
1268 0 478 165 $Parent->isa("PPI::Statement") and &_INSTANCE(scalar $Parent->parent, "PPI::Structure::List")
1277 17 54 94 $function and $function->content =~ /^(?:map|grep|sort|eval|do)$/
1281 17 48 6 $function and $function->content =~ /^(?:print|say)$/
1458 158513 1172 69727 ref $Parent eq "PPI::Statement" and my $first = $Parent->schild(0)
1460 69727 0 0 $first->isa("PPI::Token::Label") and not my $second = $Parent->schild(1)

or 2 conditions

line l !l condition
317 0 0 $errstr ||= "Unknown Tokenizer Error"
1013 193 2 $STATEMENT_CLASSES{$Token->content} || ''
1035 189 25 $STATEMENT_CLASSES{$LastChild->content} || ''
1326 13602 8871 $self->{'features'}[-1] || {}

or 3 conditions

line l !l&&r !l&&!r condition
410 5461 2465 47370 $Parent->isa("PPI::Structure::List") or $Parent->isa("PPI::Structure::Constructor")
488 9837 17 21 not $Next->isa("PPI::Token::Operator") or $Next->content ne "=>"
539 7 3284 37388 $is_lexsub or $content eq "sub"
627 3 3 28726 $Parent->isa("PPI::Structure::Given") or $Parent->isa("PPI::Structure::When")
678 17833 0 153172 $Token->__LEXER__closes or $Token->isa("PPI::Token::Separator")
831 147 163 490 $Token->content eq 'else' || $Token->content eq 'elsif'
890 18 3 106 $Token->isa("PPI::Token::Structure") and $Token->content eq "(" or $Token->isa("PPI::Token::QuoteLike::Words")
982 149 8 0 $LastChild->content eq 'while' || $LastChild->content eq 'until'
1011 172 106 214 $LastChild->content eq "foreach" or $LastChild->content eq "for"
1225 1 1 0 $prior_content eq '@' || $prior_content eq '$'
1255 52 1 0 $Parent->schildren == 2 or $Parent->schildren == 3 and $Parent->schild(2)->isa("PPI::Token::Number")