Branch Coverage

blib/lib/PPI/Token/Unknown.pm
Criterion Covered Total %
branch 151 160 94.3


line true false branch
53 1385 34860 if ($c eq '*') { }
25203 9657 elsif ($c eq '$') { }
2952 6705 elsif ($c eq '@') { }
1509 5196 elsif ($c eq '%') { }
1305 3891 elsif ($c eq '&') { }
1974 1917 elsif ($c eq '-') { }
1917 0 elsif ($c eq ':') { }
55 91 1294 if ($char =~ /\d/)
61 445 849 if ($char =~ /[\w:]/)
64 431 14 unless ($prev and $prev->isa("PPI::Token::Number"))
70 26 837 if ($char eq "{")
73 0 26 if ($t->{'line'} =~ /$PPI::Token::Unknown::CURLY_SYMBOL/cg)
81 43 820 if ($char eq "*")
83 1 41 if ($prev and $prev->isa("PPI::Token::Operator") and $prev->content eq "->")
89 75 787 if ($char eq "*" or $char eq "=")
95 94 693 if $self->_is_cast_or_op($char)
104 127 25076 if ($char eq "*" or $char eq "#")
106 2 41 if ($prev and $prev->isa("PPI::Token::Operator") and $prev->content eq "->")
112 24153 1048 if ($char =~ /[a-z_]/i)
120 12 1036 if ($noname{$char} and $t->_current_token_has_signatures_active)
125 891 145 if ($PPI::Token::Unknown::MAGIC{$c . $char})
131 19 126 if ($char eq "{")
134 4 15 if ($t->{'line'} =~ /$PPI::Token::Unknown::CURLY_SYMBOL/cg)
149 13 2939 if ($char eq "*")
151 1 11 if ($prev and $prev->isa("PPI::Token::Operator") and $prev->content eq "->")
157 2066 885 if ($char =~ /[\w:]/)
164 1 884 if ($char eq ")" and $t->_current_token_has_signatures_active)
169 30 854 if ($PPI::Token::Unknown::MAGIC{$c . $char})
175 264 590 if ($char eq "{")
178 1 263 if ($t->{'line'} =~ /$PPI::Token::Unknown::CURLY_SYMBOL/cg)
193 33 1476 if ($char eq "*" or $char eq "[")
195 2 29 if ($prev and $prev->isa("PPI::Token::Operator") and $prev->content eq "->")
196 1 1 if ($char eq "*")
200 1 0 if ($char eq "[")
208 110 1397 if ($char =~ /\d/)
215 2 1395 if ($char eq ")" and $t->_current_token_has_signatures_active)
221 240 1155 if ($char eq "^" or $PPI::Token::Unknown::MAGIC{$c . $char})
226 448 707 if ($char =~ /[\w:]/)
229 436 12 unless ($prev and $prev->isa("PPI::Token::Number"))
235 54 665 if ($char eq "{")
238 1 53 if ($t->{'line'} =~ /$PPI::Token::Unknown::CURLY_SYMBOL/cg)
245 166 552 if $self->_is_cast_or_op($char)
255 12 1293 if ($char eq "*")
257 1 10 if ($prev and $prev->isa("PPI::Token::Operator") and $prev->content eq "->")
264 103 1201 if ($char =~ /\d/)
270 233 968 if ($char =~ /[\w:]/)
273 214 19 unless ($prev and $prev->isa("PPI::Token::Number"))
279 113 874 if $self->_is_cast_or_op($char)
288 135 1839 if ($char =~ /\d/o)
294 15 1824 if ($char eq ".")
300 204 1620 if ($char =~ /[a-zA-Z]/)
312 9 1908 if ($char eq ":")
321 926 982 if ($self->__TOKENIZER__is_an_attribute($t))
339 151 2341 if $char eq "\$"
340 32 2309 if $char eq "\@"
341 44 2265 if $char eq "%"
342 34 2231 if $char eq "*"
343 112 2119 if $char eq "{"
358 157 508 unless $token->significant
359 28 480 if $extra_check and not &$extra_check($token)
374 20 353 unless $token
376 36 317 if ($token->isa("PPI::Token::Structure") and $token->content eq "}")
385 28 34 unless $token->isa("PPI::Token::Structure")
386 0 34 if ($token eq "}")
390 32 2 if ($token eq "{")
392 0 32 if $structure_depth
397 2 34 unless $token
401 0 34 unless $token
402 1 33 if $token->isa("PPI::Token::Symbol")
405 9 24 if $meth_or_subscript_end{$token->content}
410 5 19 $produces_or_wants_value ? :
415 74 171 if $token->isa("PPI::Token::Structure") and $list_start_or_term_end{$token->content} or $token->isa("PPI::Token::Cast") or $token->isa("PPI::Token::Operator") or $token->isa("PPI::Token::Label")
420 99 72 unless $token->isa("PPI::Token::Word")
423 72 0 if not $token or $token->content ne "->"
433 79 1829 unless $p0
436 176 1653 if $p0->isa("PPI::Token::Attribute")
439 126 1527 if $p0->isa("PPI::Token::Prototype")
442 580 947 unless $p0->isa("PPI::Token::Word")
445 0 947 if ($p0->isa("PPI::Token::Word") and $p0->content eq "sub")
452 108 0 if ($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 '')