Branch Coverage

blib/lib/PPI/Token/Unknown.pm
Criterion Covered Total %
branch 144 154 93.5


line true false branch
53 1353 25743 if ($c eq '*') { }
16744 8999 elsif ($c eq '$') { }
2774 6225 elsif ($c eq '@') { }
1427 4798 elsif ($c eq '%') { }
1305 3493 elsif ($c eq '&') { }
1933 1560 elsif ($c eq '-') { }
1560 0 elsif ($c eq ':') { }
55 83 1270 if ($char =~ /\d/)
61 415 855 if ($char =~ /[\w:]/)
64 396 19 unless ($prev and $prev->isa("PPI::Token::Number"))
70 28 846 if ($char eq "{")
73 0 28 if ($t->{'line'} =~ /$PPI::Token::Unknown::CURLY_SYMBOL/cg)
81 37 837 if ($char eq "*")
83 1 35 if ($prev and $prev->isa("PPI::Token::Operator") and $prev->content eq "->")
89 72 801 if ($char eq "*" or $char eq "=")
95 92 709 if $self->_is_cast_or_op($char)
104 155 16589 if ($char eq "*" or $char eq "#")
106 2 69 if ($prev and $prev->isa("PPI::Token::Operator") and $prev->content eq "->")
112 15698 1044 if ($char =~ /[a-z_]/i)
118 905 139 if ($PPI::Token::Unknown::MAGIC{$c . $char})
124 18 121 if ($char eq "{")
127 4 14 if ($t->{'line'} =~ /$PPI::Token::Unknown::CURLY_SYMBOL/cg)
142 8 2766 if ($char eq "*")
144 1 6 if ($prev and $prev->isa("PPI::Token::Operator") and $prev->content eq "->")
150 1924 849 if ($char =~ /[\w:]/)
156 28 821 if ($PPI::Token::Unknown::MAGIC{$c . $char})
162 249 572 if ($char eq "{")
165 1 248 if ($t->{'line'} =~ /$PPI::Token::Unknown::CURLY_SYMBOL/cg)
180 32 1395 if ($char eq "*" or $char eq "[")
182 2 28 if ($prev and $prev->isa("PPI::Token::Operator") and $prev->content eq "->")
183 1 1 if ($char eq "*")
187 1 0 if ($char eq "[")
195 97 1328 if ($char =~ /\d/)
202 227 1101 if ($char eq "^" or $PPI::Token::Unknown::MAGIC{$c . $char})
207 423 678 if ($char =~ /[\w:]/)
210 416 7 unless ($prev and $prev->isa("PPI::Token::Number"))
216 46 639 if ($char eq "{")
219 1 45 if ($t->{'line'} =~ /$PPI::Token::Unknown::CURLY_SYMBOL/cg)
226 147 537 if $self->_is_cast_or_op($char)
236 14 1291 if ($char eq "*")
238 1 11 if ($prev and $prev->isa("PPI::Token::Operator") and $prev->content eq "->")
245 93 1211 if ($char =~ /\d/)
251 219 992 if ($char =~ /[\w:]/)
254 206 13 unless ($prev and $prev->isa("PPI::Token::Number"))
260 110 895 if $self->_is_cast_or_op($char)
269 117 1816 if ($char =~ /\d/o)
275 10 1806 if ($char eq ".")
281 210 1596 if ($char =~ /[a-zA-Z]/)
293 7 1553 if ($char eq ":")
302 923 630 if ($self->__TOKENIZER__is_an_attribute($t))
320 154 2336 if $char eq "\$"
321 23 2313 if $char eq "\@"
322 34 2279 if $char eq "%"
323 34 2245 if $char eq "*"
324 104 2141 if $char eq "{"
339 148 478 unless $token->significant
340 23 455 if $extra_check and not &$extra_check($token)
355 23 326 unless $token
357 35 291 if ($token->isa("PPI::Token::Structure") and $token->content eq "}")
366 23 34 unless $token->isa("PPI::Token::Structure")
367 0 34 if ($token eq "}")
371 33 1 if ($token eq "{")
373 0 33 if $structure_depth
378 1 34 unless $token
382 0 34 unless $token
383 0 34 if $token->isa("PPI::Token::Symbol")
386 9 25 if $meth_or_subscript_end{$token->content}
391 5 20 $produces_or_wants_value ? :
396 66 156 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")
401 84 72 unless $token->isa("PPI::Token::Word")
404 72 0 if not $token or $token->content ne "->"
414 77 1476 unless $p0
417 176 1300 if $p0->isa("PPI::Token::Attribute")
420 126 1174 if $p0->isa("PPI::Token::Prototype")
423 529 645 unless $p0->isa("PPI::Token::Word")
426 0 645 if ($p0->isa("PPI::Token::Word") and $p0->content eq "sub")
433 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 '')