Branch Coverage

blib/lib/PPI/Token/Whitespace.pm
Criterion Covered Total %
branch 79 86 91.8


line true false branch
150 6652 44366 if ($line =~ /^\s*$/) { }
4317 40049 elsif ($line =~ /^\s*#/) { }
742 39307 elsif ($line =~ /^=(\w+)/) { }
2 39305 elsif ($line =~ /^use v6\-alpha\;/) { }
164 0 742 if ($1 eq 'cut') { }
180 2 691 unless defined $line6
200 117675 260853 if $COMMITMAP{$char}
203 241548 19305 if $CLASSMAP{$char}
205 8416 10889 if ($char == 40) { }
2061 8828 elsif ($char == 60) { }
1054 7774 elsif ($char == 47) { }
854 6920 elsif ($char == 120) { }
6914 6 elsif ($char == 45) { }
6 0 elsif ($char >= 128) { }
207 3028 5388 if $t->{'token'}
221 3 0 if ($tokens[0] and $tokens[0]->isa("PPI::Token::Word") and $p1 and $p1->isa("PPI::Token::Word") and $p1->content eq "sub" and !$p2 || $p2->isa('PPI::Token::Structure') || $p2->isa('PPI::Token::Whitespace') && $p2->content eq '' || $p2->isa('PPI::Token::Word') && $p2->content =~ /^(?:my|our|state)$/)
254 62 6411 if ($p0 and $p0->isa("PPI::Token::Word") and $p0->content eq "sub" and not $p1 && $p1->isa('PPI::Token::Operator') && $p1->content eq '->')
266 523 1538 if $t->{'token'}
276 332 1729 if $prev and $prev->isa("PPI::Token::Symbol")
277 0 1729 if $prev and $prev->isa("PPI::Token::Magic")
278 31 1698 if $prev and $prev->isa("PPI::Token::Number")
279 0 1698 if $prev and $prev->isa("PPI::Token::ArrayIndex")
283 799 899 if $next_char =~ /<[^>]/
285 85 814 unless $prev
291 49 706 if $prev->isa("PPI::Token::Structure") and $prec eq "(" or $prev->isa("PPI::Token::Structure") and $prec eq ";" or $prev->isa("PPI::Token::Word") and $prec eq "while" or $prev->isa("PPI::Token::Operator") and $prec eq "=" or $prev->isa("PPI::Token::Operator") and $prec eq ","
298 18 688 if ($prev->isa("PPI::Token::Structure") and $prec eq "}")
303 3 15 if ($t->{'line'} =~ /\G<(?!\d)\w+>/cg)
315 361 693 if $t->{'token'}
323 100 954 unless $prev
333 443 511 if $prev->isa("PPI::Token::Operator")
336 69 442 if $prev->isa("PPI::Token::Symbol")
337 9 433 if ($prec eq "]" and $prev->isa("PPI::Token::Structure"))
342 38 395 if $prev->isa("PPI::Token::Number")
345 41 40 if ($prev->isa("PPI::Token::Structure") and $prec eq '(' || $prec eq '{' || $prec eq ';')
359 69 277 if ($MATCHWORD{$prec} and $prev->isa("PPI::Token::Word"))
370 277 0 if (defined $next_char and length $next_char)
371 10 267 if ($next_char =~ /(?:\^|\[|\\)/)
388 208 646 if ($t->_current_x_is_operator)
390 132 76 if $t->{'line'} =~ /\G(?: \d # x op with no whitespace e.g. 'x3' | (?!( # negative lookahead => # not on left of fat comma | \w # not a word like "xyzzy" | \s # not x op plus whitespace )) )/cgx
410 4981 1933 if ($context eq 'operator') { }
418 5 1 if $c =~ /\w/
419 0 1 if $c =~ /\s/
429 36897 2027 if $_[1]{'token'}