Branch Coverage

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


line true false branch
150 6697 44456 if ($line =~ /^\s*$/) { }
4323 40133 elsif ($line =~ /^\s*#/) { }
752 39381 elsif ($line =~ /^=(\w+)/) { }
2 39379 elsif ($line =~ /^use v6\-alpha\;/) { }
164 0 752 if ($1 eq 'cut') { }
180 2 691 unless defined $line6
200 118161 261770 if $COMMITMAP{$char}
203 242282 19488 if $CLASSMAP{$char}
205 8502 10986 if ($char == 40) { }
2048 8938 elsif ($char == 60) { }
1071 7867 elsif ($char == 47) { }
859 7008 elsif ($char == 120) { }
7002 6 elsif ($char == 45) { }
6 0 elsif ($char >= 128) { }
207 3032 5470 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 6479 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 527 1521 if $t->{'token'}
276 332 1716 if $prev and $prev->isa("PPI::Token::Symbol")
277 0 1716 if $prev and $prev->isa("PPI::Token::Magic")
278 23 1693 if $prev and $prev->isa("PPI::Token::Number")
279 0 1693 if $prev and $prev->isa("PPI::Token::ArrayIndex")
283 794 899 if $next_char =~ /<[^>]/
285 87 812 unless $prev
291 41 709 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 17 692 if ($prev->isa("PPI::Token::Structure") and $prec eq "}")
303 3 14 if ($t->{'line'} =~ /\G<(?!\d)\w+>/cg)
315 366 705 if $t->{'token'}
323 99 972 unless $prev
333 456 516 if $prev->isa("PPI::Token::Operator")
336 69 447 if $prev->isa("PPI::Token::Symbol")
337 6 441 if ($prec eq "]" and $prev->isa("PPI::Token::Structure"))
342 33 408 if $prev->isa("PPI::Token::Number")
345 33 38 if ($prev->isa("PPI::Token::Structure") and $prec eq '(' || $prec eq '{' || $prec eq ';')
359 69 284 if ($MATCHWORD{$prec} and $prev->isa("PPI::Token::Word"))
370 284 0 if (defined $next_char and length $next_char)
371 15 269 if ($next_char =~ /(?:\^|\[|\\)/)
388 209 650 if ($t->_current_x_is_operator)
390 120 89 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 5034 1968 if ($context eq 'operator') { }
418 5 1 if $c =~ /\w/
419 0 1 if $c =~ /\s/
429 36973 2039 if $_[1]{'token'}