Branch Coverage

blib/lib/PPI/Token/Whitespace.pm
Criterion Covered Total %
branch 82 88 93.1


line true false branch
150 6855 45948 if ($line =~ /^\s*$/) { }
4346 41602 elsif ($line =~ /^\s*#/) { }
766 40836 elsif ($line =~ /^=(\w+)/) { }
2 40834 elsif ($line =~ /^use v6\-alpha\;/) { }
164 0 766 if ($1 eq 'cut') { }
180 2 691 unless defined $line6
200 119840 275716 if $COMMITMAP{$char}
203 256035 19681 if $CLASSMAP{$char}
205 8448 11233 if ($char == 40) { }
2094 9139 elsif ($char == 60) { }
1038 8101 elsif ($char == 47) { }
840 7261 elsif ($char == 120) { }
7255 6 elsif ($char == 45) { }
6 0 elsif ($char >= 128) { }
207 3123 5325 if $t->{'token'}
216 36 8412 if $has_sig
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 6421 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 564 1530 if $t->{'token'}
276 319 1775 if $prev and $prev->isa("PPI::Token::Symbol")
277 0 1775 if $prev and $prev->isa("PPI::Token::Magic")
278 40 1735 if $prev and $prev->isa("PPI::Token::Number")
279 1 1734 if $prev and $prev->isa("PPI::Token::ArrayIndex")
283 824 910 if $next_char =~ /<[^>]/
285 94 816 unless $prev
291 41 716 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 15 701 if ($prev->isa("PPI::Token::Structure") and $prec eq "}")
303 3 12 if ($t->{'line'} =~ /\G<(?!\d)\w+>/cg)
315 366 672 if $t->{'token'}
323 92 946 unless $prev
333 446 500 if $prev->isa("PPI::Token::Operator")
336 65 435 if $prev->isa("PPI::Token::Symbol")
337 11 424 if ($prec eq "]" and $prev->isa("PPI::Token::Structure"))
342 42 382 if $prev->isa("PPI::Token::Number")
345 42 37 if ($prev->isa("PPI::Token::Structure") and $prec eq '(' || $prec eq '{' || $prec eq ';')
359 73 252 if ($MATCHWORD{$prec} and $prev->isa("PPI::Token::Word"))
370 252 0 if (defined $next_char and length $next_char)
371 14 238 if ($next_char =~ /(?:\^|\[|\\)/)
388 201 639 if ($t->_current_x_is_operator)
390 119 82 if $t->{'line'} =~ /\G(?:
410 5288 1967 if ($context eq 'operator') { }
418 5 1 if $c =~ /\w/
419 0 1 if $c =~ /\s/
429 38398 2072 if $_[1]{'token'}