Branch Coverage

lib/B/DeparseTree/SyntaxTree.pm
Criterion Covered Total %
branch 86 138 62.3


line true false branch
44 0 0 unless ref $items eq 'ARRAY'
49 0 0 if (ref $item) { }
50 0 0 if (ref $item eq 'ARRAY' and scalar @$item == 2) { }
0 0 elsif (eval { do { $item->isa('B::DeparseTree::TreeNode') } }) { }
61 0 0 if @result and $sep
72 560 168 if $result
73 2 726 if (ref $item) { }
74 0 2 if (ref $item eq 'ARRAY' and scalar @$item == 2) { }
2 0 elsif (eval { do { $item->isa('B::DeparseTree::TreeNode') } }) { }
78 2 0 if (exists $item->{'fmt'}) { }
88 0 726 if (index($item, '@B::DeparseTree::TreeNode') > 0)
106 0 26583 if ($spec eq '%%') { }
2785 23798 elsif ($spec eq '%+') { }
2785 21013 elsif ($spec eq '%-') { }
21013 0 elsif ($spec eq '%|') { }
118 11748 26583 if $fmt
124 2785 0 unless defined $check_level
128 0 2785 if ($check_level < 0)
129 0 0 if $check_level
145 0 26583 if ($self->{'use_tabs'}) { }
156 114088 7943 if (ref $item) { }
157 0 114088 if (ref $item eq 'ARRAY' and scalar @$item == 2) { }
114088 0 elsif (eval { do { $item->isa('B::DeparseTree::TreeNode') } }) { }
162 52066 62022 if (exists $item->{'fmt'}) { }
61856 166 elsif (not exists $item->{'texts'} and exists $item->{'text'}) { }
164 7243 44823 if ($item->{'maybe_parens'})
166 306 6937 if ($mp->{'force'} or $mp->{'parens'})
183 0 7943 if (index($item, '@B::DeparseTree::TreeNode') > 0)
204 2 114 if $text and $sep
205 0 116 if (ref $item eq 'ARRAY') { }
0 116 elsif (eval { do { $item->isa('B::DeparseTree::TreeNode') } }) { }
215 4 25 if ($opts->{'maybe_parens'})
221 0 4 $parens ? :
224 0 4 if exists $info->{'text'} and $parens
233 6699 5507 unless defined $opts
240 4102 8104 unless defined $indexes
247 1341 10865 unless (defined $op)
252 0 12206 if ($opts->{'relink_children'})
255 0 0 if ($args[$i]->isa('B::DeparseTree::TreeNode'))
262 0 12206 if ($opts->{'synthesized_nodes'})
270 1560 10646 if ($opts->{'maybe_parens'})
277 38 1522 $parens ? :
280 38 1522 if exists $info->{'text'} and $parens
331 76480 0 unless $find_addr
343 8320 80607 if (index('%+-|', substr($spec, 1, 1)) >= 0) { }
49716 30891 elsif ($spec eq '%c') { }
11748 19143 elsif ($spec eq '%C') { }
0 19143 elsif ($spec eq '%f') { }
880 18263 elsif ($spec eq '%F') { }
18263 0 elsif ($spec eq '%;') { }
0 0 elsif ($spec eq "\cS") { }
349 0 49716 if ($i >= scalar @{$indexes;})
353 0 49716 if ($index >= scalar @args)
359 0 49716 if (ref $info and $info->{'addr'} == $find_addr)
362 0 0 if exists $info->{'maybe_parens'} and $info->{'maybe_parens'}{'parens'}
372 21139 10104 if $j > $low
376 0 31243 if (ref $info and $info->{'addr'} == $find_addr)
379 0 0 if exists $info->{'maybe_parens'} and $info->{'maybe_parens'}{'parens'}
392 0 880 if ($i >= scalar @$indexes)
396 0 880 if ($arg_index >= scalar @args)
399 0 880 if (ref($transform_fn ne 'CODE'))
415 26538 13526 if ($j > 0 and length $result > $start_size)
417 15 26523 if substr($result, -1) eq "\n"
418 7599 18939 if substr($result, -1) eq ';'
433 0 40064 if (ref $info and $info->{'addr'} == $find_addr)
435 0 0 if exists $info->{'maybe_parens'} and $info->{'maybe_parens'}{'parens'}
438 3507 36557 if (not $str) { }
459 24709 51771 if $fmt
460 0 76480 if ($find_addr != -2)