Branch Coverage

lib/HTML/Object/DOM/Element/Table.pm
Criterion Covered Total %
branch 56 118 47.4


line true false branch
33 0 1 unless $self->SUPER::init(@_)
34 0 1 unless defined $self->{'tag'} and length "$self->{'tag'}"
49 12 4 unless ($def->{'caller'}[0] eq ref $self)
86 0 0 if ($self->{'_table_captions'} and not $self->_is_table_reset("caption") and not $self->{'_table_captions'}->is_empty)
93 0 1 unless ($capt)
95 0 0 unless $self->_load_class("HTML::Object::DOM::Element::TableCaption")
104 0 0 unless $self->_load_class("HTML::Object::DOM::Collection")
124 0 1 unless defined $pos and $self->_is_integer($pos)
130 0 1 if $pos > $size
134 0 1 if $pos < 0 and abs $pos > $size
138 1 0 if $pos < 0
143 0 1 unless defined $kid_pos
167 0 1 if (defined $pos)
169 0 0 unless $self->_is_integer($pos)
173 0 0 if $pos > $size
177 0 0 if $pos < 0 and abs $pos > $size
181 0 0 if $pos < 0
186 0 0 unless ($rows->length or $body)
190 0 1 unless $self->_load_class("HTML::Object::DOM::Element::TableRow")
193 0 1 if (defined $pos) { }
1 0 elsif ($body) { }
196 0 0 if ($rows->is_empty) { }
199 0 0 if ($body) { }
215 0 0 unless defined $elem
221 0 0 unless $parent
226 0 0 unless defined $real_pos
261 2 19 if $self->{'_table_rows'} and not $self->_is_table_reset("rows", "tbody", "tfoot", "thead")
267 0 140 if ($tag eq 'tr') { }
36 104 elsif ($tag eq 'tbody' or $tag eq 'tfoot' or $tag eq 'thead') { }
274 32 4 unless $rows->is_empty
278 1 18 unless ($self->{'_table_rows'})
280 0 1 unless $self->_load_class("HTML::Object::DOM::Collection")
324 0 3 unless $self->_load_class("HTML::Object::DOM::Element::TableSection")
332 11 24 if $self->_is_a($_, "HTML::Object::DOM::Element::TableSection")
333 1 2 if ($tag eq 'tbody') { }
1 1 elsif ($tag eq 'tfoot') { }
1 0 elsif ($tag eq 'thead') { }
336 1 0 if ($last_elem) { }
349 0 1 if ($list->is_empty) { }
362 0 1 if ($list->is_empty) { }
369 0 0 unless $e->_is_a("HTML::Object::DOM::Node")
371 0 0 if ($tag ne "caption" and $tag ne "colgroup")
380 0 0 unless (defined $pos)
404 3 12 if ($self->_is_a($children->[$i], "HTML::Object::Element") and $children->[$i]->tag eq $tag)
423 2 8 if $self->{$cache_name} and not $self->_is_table_reset($tag)
429 8 82 if ($_->tag eq $tag)
434 0 8 unless $self->_load_class("HTML::Object::DOM::Collection")
447 26 0 if (scalar @types) { }
451 38 0 if (defined $type and length $type)
453 22 16 if length $$self{"_table_reset_$type"}
461 0 0 if exists $self->{$_} and length $self->{$_}
482 12 95 if ($type eq 'all') { }
493 14 93 if $type eq "rows" or $type eq "all"
515 0 1 if (not $self->_is_a($new, $class) or $new->tag ne $tag)
527 0 9 if ($e_tag eq $tag) { }
0 9 elsif (not defined $pos and $tag eq 'thead' && $e_tag ne 'caption' && $e_tag ne 'colgroup' || $tag eq 'tfoot' && $e_tag ne 'caption' && $e_tag ne 'colgroup' && $e_tag ne 'thead') { }
544 1 0 unless (defined $pos)
546 1 0 if ($tag eq 'caption') { }
560 0 1 if (defined $old) { }