Branch Coverage

blib/lib/PPI/Token/Unknown.pm
Criterion Covered Total %
branch 157 166 94.5


line true false branch
53 1398 27119 if ($c eq '*') { }
17565 9554 elsif ($c eq '$') { }
2946 6608 elsif ($c eq '@') { }
1493 5115 elsif ($c eq '%') { }
1240 3875 elsif ($c eq '&') { }
1967 1908 elsif ($c eq '-') { }
1908 0 elsif ($c eq ':') { }
55 89 1309 if ($char =~ /\d/)
61 429 880 if ($char =~ /[\w:]/)
64 414 15 unless ($prev and $prev->isa("PPI::Token::Number"))
70 27 868 if ($char eq "{")
73 0 27 if ($t->{'line'} =~ /$PPI::Token::Unknown::CURLY_SYMBOL/cg)
81 38 857 if ($char eq "*")
83 1 35 if ($prev and $prev->isa("PPI::Token::Operator") and $prev->content eq "->")
89 74 820 if ($char eq "*" or $char eq "=")
95 114 706 if $self->_is_cast_or_op($char)
104 119 17446 if ($char eq "*" or $char eq "#")
106 2 31 if ($prev and $prev->isa("PPI::Token::Operator") and $prev->content eq "->")
112 16483 1080 if ($char =~ /[a-z_]/i)
119 26 1033 if ($char eq ")" or $char eq "=" or $char eq ",")
121 12 35 if ($has_sig)
127 920 148 if ($PPI::Token::Unknown::MAGIC{$c . $char})
133 17 131 if ($char eq "{")
136 4 13 if ($t->{'line'} =~ /$PPI::Token::Unknown::CURLY_SYMBOL/cg)
151 12 2934 if ($char eq "*")
153 1 10 if ($prev and $prev->isa("PPI::Token::Operator") and $prev->content eq "->")
159 2088 857 if ($char =~ /[\w:]/)
166 7 850 if ($char eq ")")
168 1 6 if ($has_sig)
174 29 827 if ($PPI::Token::Unknown::MAGIC{$c . $char})
180 249 578 if ($char eq "{")
183 1 248 if ($t->{'line'} =~ /$PPI::Token::Unknown::CURLY_SYMBOL/cg)
198 29 1464 if ($char eq "*" or $char eq "[")
200 2 24 if ($prev and $prev->isa("PPI::Token::Operator") and $prev->content eq "->")
201 1 1 if ($char eq "*")
205 1 0 if ($char eq "[")
213 106 1385 if ($char =~ /\d/)
220 10 1375 if ($char eq ")")
222 2 8 if ($has_sig)
229 243 1140 if ($char eq "^" or $PPI::Token::Unknown::MAGIC{$c . $char})
234 452 688 if ($char =~ /[\w:]/)
237 444 8 unless ($prev and $prev->isa("PPI::Token::Number"))
243 49 647 if ($char eq "{")
246 1 48 if ($t->{'line'} =~ /$PPI::Token::Unknown::CURLY_SYMBOL/cg)
253 169 526 if $self->_is_cast_or_op($char)
263 7 1233 if ($char eq "*")
265 1 5 if ($prev and $prev->isa("PPI::Token::Operator") and $prev->content eq "->")
272 90 1149 if ($char =~ /\d/)
278 191 958 if ($char =~ /[\w:]/)
281 182 9 unless ($prev and $prev->isa("PPI::Token::Number"))
287 94 873 if $self->_is_cast_or_op($char)
296 128 1839 if ($char =~ /\d/o)
302 10 1829 if ($char eq ".")
308 204 1625 if ($char =~ /[a-zA-Z]/)
320 10 1898 if ($char eq ":")
329 926 972 if ($self->__TOKENIZER__is_an_attribute($t))
347 164 2318 if $char eq "\$"
348 41 2277 if $char eq "\@"
349 51 2226 if $char eq "%"
350 23 2203 if $char eq "*"
351 98 2105 if $char eq "{"
366 155 508 unless $token->significant
367 25 483 if $extra_check and not &$extra_check($token)
382 23 354 unless $token
384 35 319 if ($token->isa("PPI::Token::Structure") and $token->content eq "}")
393 25 34 unless $token->isa("PPI::Token::Structure")
394 0 34 if ($token eq "}")
398 32 2 if ($token eq "{")
400 0 32 if $structure_depth
405 1 34 unless $token
409 1 33 unless $token
410 0 33 if $token->isa("PPI::Token::Symbol")
413 9 24 if $meth_or_subscript_end{$token->content}
418 5 19 $produces_or_wants_value ? :
423 78 165 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")
428 92 73 unless $token->isa("PPI::Token::Word")
431 73 0 if not $token or $token->content ne "->"
441 75 1823 unless $p0
444 176 1647 if $p0->isa("PPI::Token::Attribute")
447 126 1521 if $p0->isa("PPI::Token::Prototype")
450 565 956 unless $p0->isa("PPI::Token::Word")
453 0 956 if ($p0->isa("PPI::Token::Word") and $p0->content eq "sub")
460 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 '')