Branch Coverage

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


line true false branch
150 6679 44645 if ($line =~ /^\s*$/) { }
4323 40322 elsif ($line =~ /^\s*#/) { }
747 39575 elsif ($line =~ /^=(\w+)/) { }
2 39573 elsif ($line =~ /^use v6\-alpha\;/) { }
164 0 747 if ($1 eq 'cut') { }
180 2 691 unless defined $line6
200 117864 262862 if $COMMITMAP{$char}
203 243764 19098 if $CLASSMAP{$char}
205 8194 10904 if ($char == 40) { }
2064 8840 elsif ($char == 60) { }
1027 7813 elsif ($char == 47) { }
815 6998 elsif ($char == 120) { }
6992 6 elsif ($char == 45) { }
6 0 elsif ($char >= 128) { }
207 2987 5207 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 42 6230 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 533 1531 if $t->{'token'}
276 330 1734 if $prev and $prev->isa("PPI::Token::Symbol")
277 0 1734 if $prev and $prev->isa("PPI::Token::Magic")
278 29 1705 if $prev and $prev->isa("PPI::Token::Number")
279 0 1705 if $prev and $prev->isa("PPI::Token::ArrayIndex")
283 797 908 if $next_char =~ /<[^>]/
285 79 829 unless $prev
291 54 712 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 12 700 if ($prev->isa("PPI::Token::Structure") and $prec eq "}")
303 3 9 if ($t->{'line'} =~ /\G<(?!\d)\w+>/cg)
315 362 665 if $t->{'token'}
323 89 938 unless $prev
333 446 492 if $prev->isa("PPI::Token::Operator")
336 63 429 if $prev->isa("PPI::Token::Symbol")
337 11 418 if ($prec eq "]" and $prev->isa("PPI::Token::Structure"))
342 45 373 if $prev->isa("PPI::Token::Number")
345 40 34 if ($prev->isa("PPI::Token::Structure") and $prec eq '(' || $prec eq '{' || $prec eq ';')
359 69 251 if ($MATCHWORD{$prec} and $prev->isa("PPI::Token::Word"))
370 251 0 if (defined $next_char and length $next_char)
371 17 234 if ($next_char =~ /(?:\^|\[|\\)/)
388 207 608 if ($t->_current_x_is_operator)
390 119 88 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 5121 1871 if ($context eq 'operator') { }
418 5 1 if $c =~ /\w/
419 0 1 if $c =~ /\s/
429 37139 2062 if $_[1]{'token'}