Branch Coverage

blib/lib/PPI/Token/Unknown.pm
Criterion Covered Total %
branch 146 154 94.8


line true false branch
53 1358 26244 if ($c eq '*') { }
16992 9252 elsif ($c eq '$') { }
2801 6451 elsif ($c eq '@') { }
1476 4975 elsif ($c eq '%') { }
1262 3713 elsif ($c eq '&') { }
1871 1842 elsif ($c eq '-') { }
1842 0 elsif ($c eq ':') { }
55 83 1275 if ($char =~ /\d/)
61 423 852 if ($char =~ /[\w:]/)
64 402 21 unless ($prev and $prev->isa("PPI::Token::Number"))
70 31 842 if ($char eq "{")
73 0 31 if ($t->{'line'} =~ /$PPI::Token::Unknown::CURLY_SYMBOL/cg)
81 36 837 if ($char eq "*")
83 1 34 if ($prev and $prev->isa("PPI::Token::Operator") and $prev->content eq "->")
89 68 804 if ($char eq "*" or $char eq "=")
95 97 707 if $self->_is_cast_or_op($char)
104 148 16844 if ($char eq "*" or $char eq "#")
106 2 62 if ($prev and $prev->isa("PPI::Token::Operator") and $prev->content eq "->")
112 15950 1040 if ($char =~ /[a-z_]/i)
118 894 146 if ($PPI::Token::Unknown::MAGIC{$c . $char})
124 13 133 if ($char eq "{")
127 4 9 if ($t->{'line'} =~ /$PPI::Token::Unknown::CURLY_SYMBOL/cg)
142 13 2788 if ($char eq "*")
144 1 11 if ($prev and $prev->isa("PPI::Token::Operator") and $prev->content eq "->")
150 1966 834 if ($char =~ /[\w:]/)
156 45 789 if ($PPI::Token::Unknown::MAGIC{$c . $char})
162 250 539 if ($char eq "{")
165 1 249 if ($t->{'line'} =~ /$PPI::Token::Unknown::CURLY_SYMBOL/cg)
180 30 1446 if ($char eq "*" or $char eq "[")
182 2 26 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 102 1372 if ($char =~ /\d/)
202 235 1137 if ($char eq "^" or $PPI::Token::Unknown::MAGIC{$c . $char})
207 433 704 if ($char =~ /[\w:]/)
210 426 7 unless ($prev and $prev->isa("PPI::Token::Number"))
216 43 668 if ($char eq "{")
219 1 42 if ($t->{'line'} =~ /$PPI::Token::Unknown::CURLY_SYMBOL/cg)
226 166 544 if $self->_is_cast_or_op($char)
236 10 1252 if ($char eq "*")
238 1 8 if ($prev and $prev->isa("PPI::Token::Operator") and $prev->content eq "->")
245 105 1156 if ($char =~ /\d/)
251 198 958 if ($char =~ /[\w:]/)
254 192 6 unless ($prev and $prev->isa("PPI::Token::Number"))
260 107 857 if $self->_is_cast_or_op($char)
269 115 1756 if ($char =~ /\d/o)
275 9 1747 if ($char eq ".")
281 182 1565 if ($char =~ /[a-zA-Z]/)
293 5 1837 if ($char eq ":")
302 923 914 if ($self->__TOKENIZER__is_an_attribute($t))
320 163 2315 if $char eq "\$"
321 31 2284 if $char eq "\@"
322 41 2243 if $char eq "%"
323 32 2211 if $char eq "*"
324 103 2108 if $char eq "{"
339 152 517 unless $token->significant
340 50 467 if $extra_check and not &$extra_check($token)
355 27 343 unless $token
357 37 306 if ($token->isa("PPI::Token::Structure") and $token->content eq "}")
366 49 35 unless $token->isa("PPI::Token::Structure")
367 1 34 if ($token eq "}")
371 33 1 if ($token eq "{")
373 0 33 if $structure_depth
378 3 34 unless $token
382 1 33 unless $token
383 0 33 if $token->isa("PPI::Token::Symbol")
386 9 24 if $meth_or_subscript_end{$token->content}
391 5 19 $produces_or_wants_value ? :
396 70 166 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 97 69 unless $token->isa("PPI::Token::Word")
404 69 0 if not $token or $token->content ne "->"
414 77 1760 unless $p0
417 176 1584 if $p0->isa("PPI::Token::Attribute")
420 126 1458 if $p0->isa("PPI::Token::Prototype")
423 522 936 unless $p0->isa("PPI::Token::Word")
426 0 936 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 '')