Branch Coverage

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


line true false branch
150 7030 50085 if ($line =~ /^\s*$/) { }
4351 45734 elsif ($line =~ /^\s*#/) { }
764 44970 elsif ($line =~ /^=(\w+)/) { }
2 44968 elsif ($line =~ /^use v6\-alpha\;/) { }
164 0 764 if ($1 eq 'cut') { }
180 2 691 unless defined $line6
200 139833 470723 if $COMMITMAP{$char}
203 443470 27253 if $CLASSMAP{$char}
205 12244 15009 if ($char == 40) { }
2082 12927 elsif ($char == 60) { }
1045 11882 elsif ($char == 47) { }
846 11036 elsif ($char == 120) { }
11030 6 elsif ($char == 45) { }
6 0 elsif ($char >= 128) { }
207 3117 9127 if $t->{'token'}
215 3818 8426 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 6432 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 557 1525 if $t->{'token'}
277 312 1770 if $prev and $prev->isa("PPI::Token::Symbol")
278 0 1770 if $prev and $prev->isa("PPI::Token::Magic")
279 31 1739 if $prev and $prev->isa("PPI::Token::Number")
280 0 1739 if $prev and $prev->isa("PPI::Token::ArrayIndex")
284 829 910 if $next_char =~ /<[^>]/
286 85 825 unless $prev
292 45 713 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 13 700 if ($prev->isa("PPI::Token::Structure") and $prec eq "}")
304 3 10 if ($t->{'line'} =~ /\G<(?!\d)\w+>/cg)
316 361 684 if $t->{'token'}
324 97 948 unless $prev
334 455 493 if $prev->isa("PPI::Token::Operator")
337 68 425 if $prev->isa("PPI::Token::Symbol")
338 16 409 if ($prec eq "]" and $prev->isa("PPI::Token::Structure"))
343 43 366 if $prev->isa("PPI::Token::Number")
346 34 30 if ($prev->isa("PPI::Token::Structure") and $prec eq '(' || $prec eq '{' || $prec eq ';')
360 73 249 if ($MATCHWORD{$prec} and $prev->isa("PPI::Token::Word"))
371 249 0 if (defined $next_char and length $next_char)
372 16 233 if ($next_char =~ /(?:\^|\[|\\)/)
389 218 628 if ($t->_current_x_is_operator)
391 123 95 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 9008 2022 if ($context eq 'operator') { }
419 5 1 if $c =~ /\w/
420 0 1 if $c =~ /\s/
430 42532 2056 if $_[1]{'token'}