Branch Coverage

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


line true false branch
53 1379 34769 if ($c eq '*') { }
25263 9506 elsif ($c eq '$') { }
2914 6592 elsif ($c eq '@') { }
1521 5071 elsif ($c eq '%') { }
1228 3843 elsif ($c eq '&') { }
1934 1909 elsif ($c eq '-') { }
1909 0 elsif ($c eq ':') { }
55 77 1302 if ($char =~ /\d/)
61 450 852 if ($char =~ /[\w:]/)
64 429 21 unless ($prev and $prev->isa("PPI::Token::Number"))
70 24 849 if ($char eq "{")
73 0 24 if ($t->{'line'} =~ /$PPI::Token::Unknown::CURLY_SYMBOL/cg)
81 35 838 if ($char eq "*")
83 1 33 if ($prev and $prev->isa("PPI::Token::Operator") and $prev->content eq "->")
89 69 803 if ($char eq "*" or $char eq "=")
95 83 720 if $self->_is_cast_or_op($char)
104 130 25133 if ($char eq "*" or $char eq "#")
106 2 44 if ($prev and $prev->isa("PPI::Token::Operator") and $prev->content eq "->")
112 24226 1035 if ($char =~ /[a-z_]/i)
120 12 1023 if ($noname{$char} and $t->_current_token_has_signatures_active)
125 865 158 if ($PPI::Token::Unknown::MAGIC{$c . $char})
131 17 141 if ($char eq "{")
134 4 13 if ($t->{'line'} =~ /$PPI::Token::Unknown::CURLY_SYMBOL/cg)
149 8 2906 if ($char eq "*")
151 1 6 if ($prev and $prev->isa("PPI::Token::Operator") and $prev->content eq "->")
157 2073 840 if ($char =~ /[\w:]/)
164 1 839 if ($char eq ")" and $t->_current_token_has_signatures_active)
169 24 815 if ($PPI::Token::Unknown::MAGIC{$c . $char})
175 270 545 if ($char eq "{")
178 1 269 if ($t->{'line'} =~ /$PPI::Token::Unknown::CURLY_SYMBOL/cg)
193 37 1484 if ($char eq "*" or $char eq "[")
195 2 31 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 103 1416 if ($char =~ /\d/)
215 2 1414 if ($char eq ")" and $t->_current_token_has_signatures_active)
221 228 1186 if ($char eq "^" or $PPI::Token::Unknown::MAGIC{$c . $char})
226 462 724 if ($char =~ /[\w:]/)
229 451 11 unless ($prev and $prev->isa("PPI::Token::Number"))
235 53 682 if ($char eq "{")
238 1 52 if ($t->{'line'} =~ /$PPI::Token::Unknown::CURLY_SYMBOL/cg)
245 169 565 if $self->_is_cast_or_op($char)
255 12 1216 if ($char eq "*")
257 1 10 if ($prev and $prev->isa("PPI::Token::Operator") and $prev->content eq "->")
264 96 1131 if ($char =~ /\d/)
270 185 946 if ($char =~ /[\w:]/)
273 175 10 unless ($prev and $prev->isa("PPI::Token::Number"))
279 93 863 if $self->_is_cast_or_op($char)
288 126 1808 if ($char =~ /\d/o)
294 7 1801 if ($char eq ".")
300 200 1601 if ($char =~ /[a-zA-Z]/)
312 8 1901 if ($char eq ":")
321 926 975 if ($self->__TOKENIZER__is_an_attribute($t))
339 154 2339 if $char eq "\$"
340 30 2309 if $char eq "\@"
341 27 2282 if $char eq "%"
342 31 2251 if $char eq "*"
343 103 2148 if $char eq "{"
358 159 498 unless $token->significant
359 50 448 if $extra_check and not &$extra_check($token)
374 23 322 unless $token
376 38 284 if ($token->isa("PPI::Token::Structure") and $token->content eq "}")
385 49 38 unless $token->isa("PPI::Token::Structure")
386 1 37 if ($token eq "}")
390 34 3 if ($token eq "{")
392 0 34 if $structure_depth
397 1 37 unless $token
401 0 37 unless $token
402 0 37 if $token->isa("PPI::Token::Symbol")
405 9 28 if $meth_or_subscript_end{$token->content}
410 5 23 $produces_or_wants_value ? :
415 63 155 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 92 63 unless $token->isa("PPI::Token::Word")
423 63 0 if not $token or $token->content ne "->"
433 79 1822 unless $p0
436 176 1646 if $p0->isa("PPI::Token::Attribute")
439 126 1520 if $p0->isa("PPI::Token::Prototype")
442 561 959 unless $p0->isa("PPI::Token::Word")
445 0 959 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 '')