Branch Coverage

blib/lib/PPI/Token/Unknown.pm
Criterion Covered Total %
branch 156 166 93.9


line true false branch
53 1385 27298 if ($c eq '*') { }
17607 9691 elsif ($c eq '$') { }
2977 6714 elsif ($c eq '@') { }
1502 5212 elsif ($c eq '%') { }
1345 3867 elsif ($c eq '&') { }
1971 1896 elsif ($c eq '-') { }
1896 0 elsif ($c eq ':') { }
55 97 1288 if ($char =~ /\d/)
61 428 860 if ($char =~ /[\w:]/)
64 408 20 unless ($prev and $prev->isa("PPI::Token::Number"))
70 34 846 if ($char eq "{")
73 0 34 if ($t->{'line'} =~ /$PPI::Token::Unknown::CURLY_SYMBOL/cg)
81 36 844 if ($char eq "*")
83 1 34 if ($prev and $prev->isa("PPI::Token::Operator") and $prev->content eq "->")
89 70 809 if ($char eq "*" or $char eq "=")
95 101 708 if $self->_is_cast_or_op($char)
104 125 17482 if ($char eq "*" or $char eq "#")
106 2 39 if ($prev and $prev->isa("PPI::Token::Operator") and $prev->content eq "->")
112 16546 1059 if ($char =~ /[a-z_]/i)
119 21 1018 if ($char eq ")" or $char eq "=" or $char eq ",")
121 12 29 if ($has_sig)
127 896 151 if ($PPI::Token::Unknown::MAGIC{$c . $char})
133 23 128 if ($char eq "{")
136 4 19 if ($t->{'line'} =~ /$PPI::Token::Unknown::CURLY_SYMBOL/cg)
151 11 2966 if ($char eq "*")
153 1 9 if ($prev and $prev->isa("PPI::Token::Operator") and $prev->content eq "->")
159 2088 888 if ($char =~ /[\w:]/)
166 8 880 if ($char eq ")")
168 1 7 if ($has_sig)
174 34 853 if ($PPI::Token::Unknown::MAGIC{$c . $char})
180 266 587 if ($char eq "{")
183 1 265 if ($t->{'line'} =~ /$PPI::Token::Unknown::CURLY_SYMBOL/cg)
198 33 1469 if ($char eq "*" or $char eq "[")
200 2 28 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 109 1391 if ($char =~ /\d/)
220 15 1376 if ($char eq ")")
222 2 13 if ($has_sig)
229 246 1143 if ($char eq "^" or $PPI::Token::Unknown::MAGIC{$c . $char})
234 420 723 if ($char =~ /[\w:]/)
237 411 9 unless ($prev and $prev->isa("PPI::Token::Number"))
243 49 683 if ($char eq "{")
246 1 48 if ($t->{'line'} =~ /$PPI::Token::Unknown::CURLY_SYMBOL/cg)
253 168 563 if $self->_is_cast_or_op($char)
263 15 1330 if ($char eq "*")
265 1 13 if ($prev and $prev->isa("PPI::Token::Operator") and $prev->content eq "->")
272 112 1232 if ($char =~ /\d/)
278 228 1004 if ($char =~ /[\w:]/)
281 217 11 unless ($prev and $prev->isa("PPI::Token::Number"))
287 109 906 if $self->_is_cast_or_op($char)
296 139 1832 if ($char =~ /\d/o)
302 9 1823 if ($char eq ".")
308 210 1613 if ($char =~ /[a-zA-Z]/)
320 11 1885 if ($char eq ":")
329 926 959 if ($self->__TOKENIZER__is_an_attribute($t))
347 164 2391 if $char eq "\$"
348 34 2357 if $char eq "\@"
349 33 2324 if $char eq "%"
350 33 2291 if $char eq "*"
351 114 2177 if $char eq "{"
366 165 522 unless $token->significant
367 34 488 if $extra_check and not &$extra_check($token)
382 24 354 unless $token
384 37 317 if ($token->isa("PPI::Token::Structure") and $token->content eq "}")
393 34 35 unless $token->isa("PPI::Token::Structure")
394 0 35 if ($token eq "}")
398 32 3 if ($token eq "{")
400 0 32 if $structure_depth
405 2 35 unless $token
409 0 35 unless $token
410 0 35 if $token->isa("PPI::Token::Symbol")
413 9 26 if $meth_or_subscript_end{$token->content}
418 5 21 $produces_or_wants_value ? :
423 65 177 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 102 75 unless $token->isa("PPI::Token::Word")
431 75 0 if not $token or $token->content ne "->"
441 72 1813 unless $p0
444 176 1637 if $p0->isa("PPI::Token::Attribute")
447 126 1511 if $p0->isa("PPI::Token::Prototype")
450 555 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 '')