Branch Coverage

blib/lib/PPI/Token/Symbol.pm
Criterion Covered Total %
branch 34 38 89.4


line true false branch
91 4 70 if $type eq "&"
95 40 30 unless &_INSTANCE($after, "PPI::Structure")
99 0 30 unless defined $braces
100 18 12 if ($type eq '$') { }
6 6 elsif ($type eq '@') { }
6 0 elsif ($type eq '%') { }
106 12 0 if $before and $before->isa("PPI::Token::Cast") and $cast_which_trumps_braces{$before->content}
109 3 3 if $braces eq "[]"
110 3 3 if $braces eq "{}"
113 2 4 if $braces eq "{}"
116 4 2 if $braces eq "[]"
165 14026 4778 if ($t->{'line'} =~ /\G([\w:\']+)/cg)
172 1224 17580 if ($content eq "\@_" or $content eq "\$_")
178 19 17561 if ($content eq "\$::")
181 17 2 if ($nextchar eq "|")
188 53 17508 if ($content =~ /^[\$%*\@&]::(?:[^\w]|$)/)
194 42 17466 if ($content =~ /^(?:\$|\@)\d+/)
200 0 17466 unless $content =~ /^( [\$\@%&*] (?: : (?!:) | # Allow single-colon non-magic variables (?: \w+ | \' (?!\d) \w+ | \:: \w+ ) (?: # Allow both :: and ' in namespace separators (?: \' (?!\d) \w+ | \:: \w+ ) )* (?: :: )? # Technically a compiler-magic hash, but keep it here ) )/x
211 58 17408 unless (length $1 eq length $content)