Branch Coverage

lib/B/DeparseTree/SyntaxTree.pm
Criterion Covered Total %
branch 93 138 67.3


line true false branch
44 0 593 unless ref $items eq 'ARRAY'
49 764 0 if (ref $item) { }
50 0 764 if (ref $item eq 'ARRAY' and scalar @$item == 2) { }
764 0 elsif (eval { do { $item->isa('B::DeparseTree::Node') } }) { }
61 363 401 if @result and $sep
72 17196 4501 if $result
73 9599 12098 if (ref $item) { }
74 5351 4248 if (ref $item eq 'ARRAY' and scalar @$item == 2) { }
4248 0 elsif (eval { do { $item->isa('B::DeparseTree::Node') } }) { }
78 4248 0 if (exists $item->{'fmt'}) { }
88 0 12098 if (index($item, '@B::DeparseTree::Node') > 0)
106 0 26473 if ($spec eq '%%') { }
2770 23703 elsif ($spec eq '%+') { }
2770 20933 elsif ($spec eq '%-') { }
20933 0 elsif ($spec eq '%|') { }
118 6666 26473 if $fmt
124 2770 0 unless defined $check_level
128 0 2770 if ($check_level < 0)
129 0 0 if $check_level
145 0 26473 if ($self->{'use_tabs'}) { }
156 97881 13321 if (ref $item) { }
157 0 97881 if (ref $item eq 'ARRAY' and scalar @$item == 2) { }
97881 0 elsif (eval { do { $item->isa('B::DeparseTree::Node') } }) { }
162 47881 50000 if (exists $item->{'fmt'}) { }
46094 3906 elsif (not exists $item->{'texts'} and exists $item->{'text'}) { }
164 7256 40625 if ($item->{'maybe_parens'})
166 192 7064 if ($mp->{'force'} or $mp->{'parens'})
183 0 13321 if (index($item, '@B::DeparseTree::Node') > 0)
204 14 167 if $text and $sep
205 0 181 if (ref $item eq 'ARRAY') { }
0 181 elsif (eval { do { $item->isa('B::DeparseTree::Node') } }) { }
215 4 42 if ($opts->{'maybe_parens'})
221 0 4 $parens ? :
224 0 4 if exists $info->{'text'} and $parens
233 7408 4641 unless defined $opts
237 3218 8831 unless defined $indexes
244 2654 9395 unless (defined $op)
249 0 12049 if ($opts->{'relink_children'})
252 0 0 if ($args[$i]->isa('B::DeparseTree::Node'))
259 0 12049 if ($opts->{'synthesized_nodes'})
267 1581 10468 if ($opts->{'maybe_parens'})
274 28 1553 $parens ? :
277 28 1553 if exists $info->{'text'} and $parens
328 76227 0 unless $find_addr
340 8289 65160 if (index('%+-|', substr($spec, 1, 1)) >= 0) { }
39409 25751 elsif ($spec eq '%c') { }
6666 19085 elsif ($spec eq '%C') { }
0 19085 elsif ($spec eq '%f') { }
901 18184 elsif ($spec eq '%F') { }
18184 0 elsif ($spec eq '%;') { }
0 0 elsif ($spec eq "\cS") { }
346 0 39409 if ($i >= scalar @{$indexes;})
350 0 39409 if ($index >= scalar @args)
356 0 39409 if (ref $info and $info->{'addr'} == $find_addr)
359 0 0 if exists $info->{'maybe_parens'} and $info->{'maybe_parens'}{'parens'}
369 18435 6666 if $j > $low
373 0 25101 if (ref $info and $info->{'addr'} == $find_addr)
376 0 0 if exists $info->{'maybe_parens'} and $info->{'maybe_parens'}{'parens'}
389 0 901 if ($i >= scalar @$indexes)
393 0 901 if ($arg_index >= scalar @args)
396 0 901 if (ref($transform_fn ne 'CODE'))
412 26788 13538 if ($j > 0 and length $result > $start_size)
414 7745 19043 if substr($result, -1) eq "\n"
415 15461 11327 if substr($result, -1) eq ';'
430 0 40326 if (ref $info and $info->{'addr'} == $find_addr)
432 0 0 if exists $info->{'maybe_parens'} and $info->{'maybe_parens'}{'parens'}
435 3352 36974 if (not $str) { }
456 29906 46321 if $fmt
457 0 76227 if ($find_addr != -2)