Branch Coverage

blib/lib/HTML/Template/Parser/NodeBuilder.pm
Criterion Covered Total %
branch 47 62 75.8


line true false branch
13 77 130 if ($type eq 'string') { }
59 71 elsif ($type eq 'var') { }
9 62 elsif ($type eq 'include') { }
11 51 elsif ($type eq 'if') { }
3 48 elsif ($type eq 'elsif') { }
7 41 elsif ($type eq 'else') { }
11 30 elsif ($type eq 'if_end') { }
1 29 elsif ($type eq 'unless') { }
0 29 elsif ($type eq 'unless_end') { }
15 14 elsif ($type eq 'loop') { }
14 0 elsif ($type eq 'loop_end') { }
79 47 213 unless $node->list_to_tree($self, $node_list)
81 3 62 if ($self->type eq 'group')
91 80 199 if ($self->is_end_tag)
92 33 47 if (not $parent->is_group_tag) { }
93 29 4 if ($parent->parent and $parent->parent->is_group_tag) { }
104 2 45 if ($self->expected_begin_tag and not $parent->sub_type =~ $self->expected_begin_tag)
109 2 43 if (my $error = $parent->can_accept_this_node($self))
115 18 224 if ($self->is_dont_add_me)
121 61 163 if ($self->can_have_child)
143 0 0 unless ($child->is_empty)
154 0 0 if ($self->can_have_child and @{$$self{'children'};} == 0)
229 6 15 if $node->type eq 'group_end'
231 4 11 if ($self->else_seen)
233 2 2 if ($node->type ne 'if_end')
238 5 8 if ($node->type eq 'else')
306 0 0 if $node->type eq 'group_end'
308 0 0 if ($self->else_seen)
310 0 0 if ($node->type ne 'unless_end')
315 0 0 if ($node->type eq 'else')
381 45 0 if (0 < @{$self->children;})