Branch Coverage

blib/lib/PPI/Token/Whitespace.pm
Criterion Covered Total %
branch 81 88 92.0


line true false branch
150 7000 49869 if ($line =~ /^\s*$/) { }
4328 45541 elsif ($line =~ /^\s*#/) { }
761 44780 elsif ($line =~ /^=(\w+)/) { }
2 44778 elsif ($line =~ /^use v6\-alpha\;/) { }
164 0 761 if ($1 eq 'cut') { }
180 2 691 unless defined $line6
200 139319 469983 if $COMMITMAP{$char}
203 442804 27179 if $CLASSMAP{$char}
205 12236 14943 if ($char == 40) { }
2060 12883 elsif ($char == 60) { }
1073 11810 elsif ($char == 47) { }
855 10955 elsif ($char == 120) { }
10949 6 elsif ($char == 45) { }
6 0 elsif ($char >= 128) { }
207 3122 9114 if $t->{'token'}
215 3818 8418 if $t->_current_token_has_signatures_active
222 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)$/)
255 42 6401 if ($p0 and $p0->isa("PPI::Token::Word") and $p0->content eq "sub" and not $p1 && $p1->isa('PPI::Token::Operator') && $p1->content eq '->')
267 553 1507 if $t->{'token'}
277 314 1746 if $prev and $prev->isa("PPI::Token::Symbol")
278 0 1746 if $prev and $prev->isa("PPI::Token::Magic")
279 35 1711 if $prev and $prev->isa("PPI::Token::Number")
280 0 1711 if $prev and $prev->isa("PPI::Token::ArrayIndex")
284 825 886 if $next_char =~ /<[^>]/
286 87 799 unless $prev
292 46 693 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 ","
299 20 673 if ($prev->isa("PPI::Token::Structure") and $prec eq "}")
304 3 17 if ($t->{'line'} =~ /\G<(?!\d)\w+>/cg)
316 364 709 if $t->{'token'}
324 97 976 unless $prev
334 467 509 if $prev->isa("PPI::Token::Operator")
337 67 442 if $prev->isa("PPI::Token::Symbol")
338 14 428 if ($prec eq "]" and $prev->isa("PPI::Token::Structure"))
343 33 395 if $prev->isa("PPI::Token::Number")
346 44 37 if ($prev->isa("PPI::Token::Structure") and $prec eq '(' || $prec eq '{' || $prec eq ';')
360 73 264 if ($MATCHWORD{$prec} and $prev->isa("PPI::Token::Word"))
371 264 0 if (defined $next_char and length $next_char)
372 14 250 if ($next_char =~ /(?:\^|\[|\\)/)
389 227 628 if ($t->_current_x_is_operator)
391 128 99 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
411 8975 1974 if ($context eq 'operator') { }
419 5 1 if $c =~ /\w/
420 0 1 if $c =~ /\s/
430 42351 2055 if $_[1]{'token'}