Branch Coverage

blib/lib/HTML/DOM/Attr.pm
Criterion Covered Total %
branch 54 60 90.0


line true false branch
49 304 44 defined $_[2] ? :
61 369 25 if (@_ > 1)
70 1 0 if $_[1] eq 'HTML::DOM::Node'
71 0 0 unless eval { do { (shift())->SUPER::DOES(@_) } }
83 13 13 defined &blessed($val) && $val->isa('HTML::DOM::Text') ? :
84 2 11 $_[0][5] ? :
103 1 12 if (ref(my $text = $self->_value))
113 5 22 if ($val ne $css_code)
122 13 251 unless defined $new
123 2 262 if ($self->[2] =~ /^on(.*)/is and my $listener_maker = $self->ownerDocument->event_attr_handler)
130 2 0 if defined $eavesdropper
137 251 13 defined $old_val ? :
148 1 5 if ($self->[5]) { }
164 22 922 if (my $style = $_[0][5])
168 255 667 if (@_ > 1)
170 1 254 if (ref $old) { }
252 2 elsif ((my $new_val = $_[0][3][0] = "$_[1]") ne $old) { }
176 1 251 if ($_[0]->get_event_listeners('DOMCharacterDataModified')) { }
192 19 648 ref $val ? :
203 4 2 unless (shift())->_element
217 6 6 wantarray ? :
235 1 10 if not ref $val or $old_node != $val
238 3 7 if (defined &blessed($new_node) and $new_node->isa('HTML::DOM::DocumentFragment'))
240 1 2 if (($new_node) = $new_node->childNodes) != 1
245 2 7 unless defined &blessed($new_node) and $new_node->isa('HTML::DOM::Text')
255 1 6 if ($in_doc)
259 2 5 if $old_parent
261 0 7 if ($new_node->is_inside($self->[0])) { }
275 1 6 if ($in_doc)
310 0 2 if $_[0] =~ /events\z/i