Branch Coverage

blib/lib/File/PackageIndexer/PPI/Util.pm
Criterion Covered Total %
branch 70 98 71.4


line true false branch
14 0 51 unless $token->isa('PPI::Structure::Constructor')
17 0 51 unless $start->isa('PPI::Token::Structure')
18 34 17 if ($start->content eq '{') { }
17 0 elsif ($start->content eq '[') { }
54 34 0 $hash->can('schildren') ? :
55 0 34 $use_siblings ? :
56 0 34 $use_siblings ? :
58 208 34 if (@children) { }
0 34 elsif ($use_siblings) { }
63 0 0 unless defined $token and ref $token
70 34 174 if ($token->isa('PPI::Statement') or $token->isa('PPI::Structure::List'))
83 0 174 if $token->isa('PPI::Token::Structure') and $token->content eq ';'
88 4 170 if ($state eq 'key' || $state eq 'value' and $token->isa('PPI::Token::QuoteLike::Words'))
95 4 4 if ($state eq 'key') { }
109 50 120 if ($state eq 'key') { }
70 50 elsif ($state eq 'comma') { }
50 0 elsif ($state eq 'value') { }
111 0 50 unless defined $keyname
116 0 70 unless $token->isa('PPI::Token::Operator')
117 0 70 unless $token->content =~ /^(?:,|=>)$/
118 52 18 defined $key ? :
122 0 50 unless defined $value
143 26 108 $array->can('schildren') ? :
144 108 26 $use_siblings ? :
145 108 26 $use_siblings ? :
147 200 346 if (@children) { }
320 26 elsif ($use_siblings) { }
152 30 290 unless defined $token and ref $token
159 101 389 if ($token->isa('PPI::Statement') or $token->isa('PPI::Structure::List'))
173 78 311 if $token->isa('PPI::Token::Structure') and $token->content eq ';'
176 219 92 if ($state eq 'elem') { }
92 0 elsif ($state eq 'comma') { }
177 32 187 if ($token->isa('PPI::Token::QuoteLike::Words')) { }
183 0 187 unless defined $value
189 0 92 unless $token->isa('PPI::Token::Operator')
190 0 92 unless $token->content =~ /^(?:,|=>)$/
204 0 36 unless $token->isa('PPI::Token::QuoteLike::Words')
216 164 73 if ($token->isa('PPI::Token::Quote')) { }
0 73 elsif ($token->isa('PPI::Token::HereDoc')) { }
217 112 52 $token->can('literal') ? :
230 0 129 unless $token->isa('PPI::Token')
231 127 2 if $token->isa('PPI::Token::Word')
232 2 0 if $token->isa('PPI::Token::Quote')
238 1155 6293 if ($token->isa('PPI::Token::Word'))
246 0 0 if ($token->isa('PPI::Token::Symbol'))
254 0 1155 unless $token->isa('PPI::Token::Word') or $token->isa('PPI::Token::Symbol')
258 1089 12 unless $next and $token->content =~ /^[\w:]+$/ and $next->isa('PPI::Token::Operator') and $next->content eq '->'
265 0 12 unless defined $third
267 12 0 if ($third->isa('PPI::Token::Word') or $third->isa('PPI::Token::Symbol'))