Condition Coverage

blib/lib/HTML/DOM/Element.pm
Criterion Covered Total %
condition 70 90 77.7


and 3 conditions

line !l l&&!r l&&r condition
328 617 356 197 exists $attr_defaults{$tag} and exists $attr_defaults{$tag}{$_[1]}
938 32 3 $tag eq 'html' and $_[1] eq 'version'
970 1 2 $tag eq 'html' and $_[1] eq 'version' and exists $_[0]{'_HTML_DOM_version'}
342 584 2 216 defined &blessed($attr) and $attr->isa('HTML::DOM::Attr')
366 798 2 2 $_[0] =~ /^on(.*)/is and my $listener_maker = $self->ownerDocument->event_attr_handler
395 40 0 7 defined &blessed($old) and $old->isa('HTML::DOM::Attr')
439 22 2 20 exists $attr_defaults{$tag} and exists $attr_defaults{$tag}{$name}
22 0 2 $tag eq 'html' and $name eq 'version'
22 1 1 $tag eq 'html' and $name eq 'version' and exists $elem->{'_HTML_DOM_version'}
468 18 0 1 defined($e = $_[1]->_element) and $e != $_[0]
476 18 0 0 $name =~ /^on(.*)/is and my $listener_maker = $_[0]->ownerDocument->event_attr_handler
494 1 0 9 defined &blessed($old) and $old->isa('HTML::DOM::Attr')
532 1 1 7 ref $old_val && &refaddr($attr) == &refaddr($old_val)
624 13 0 1 $tag eq 'html' and $attrname eq 'version'
13 1 0 $tag eq 'html' and $attrname eq 'version' and exists $self->{'_HTML_DOM_version'}
13 1 1 exists $attr_defaults{$tag = $self->tag} and exists $attr_defaults{$tag}{$attrname}
874 38 0 0 defined &blessed($_[0]) and $_[0]->isa('HTML::DOM::Event')

or 2 conditions

line l !l condition
658 26 0 $self->ownerDocument || (last)
682 5 0 $elem->ownerDocument || (last)
696 5 0 $elem->ownerDocument || (last)
894 17 4 $elem->attr('rel') || ''
908 0 4 $doc->charset || 'iso-8859-1'
1428 4 2 +(shift())->{'_HTML_DOM_view'} || (return)

or 3 conditions

line l !l&&r !l&&!r condition
209 18 20 0 $self->getAttributeNode('style') || do { $self->setAttribute('style', ''); $self->getAttributeNode('style') }
328 197 4 969 exists $attr_defaults{$tag} and exists $attr_defaults{$tag}{$_[1]} or $tag eq 'html' and $_[1] eq 'version' and exists $_[0]{'_HTML_DOM_version'}
435 1 23 21 $elem->{'_HTML_DOM_unspecified'}{$name} ||= do { return unless exists $attr_defaults{$tag} and exists $attr_defaults{$tag}{$name} or $tag eq 'html' and $name eq 'version' and exists $elem->{'_HTML_DOM_version'}; my $attr = 'HTML::DOM::Attr'->new($name); $attr->_set_ownerDocument($elem->ownerDocument); $attr->_element($elem); $attr->value($name eq 'version' ? $elem->{'_HTML_DOM_version'} : $attr_defaults{$tag}{$name}); $attr }
439 20 1 23 exists $attr_defaults{$tag} and exists $attr_defaults{$tag}{$name} or $tag eq 'html' and $name eq 'version' and exists $elem->{'_HTML_DOM_version'}
624 482 1 14 defined $self->attr($attrname) or exists $attr_defaults{$tag = $self->tag} and exists $attr_defaults{$tag}{$attrname}
733 13 17 0 $self->{'_HTML_DOM_Element_map'} ||= 'HTML::DOM::NamedNodeMap'->new($self)
940 12 7 0 $_[0]->firstChild || (@_ > 1 && $_[0]->appendChild((shift())->ownerDocument->createTextNode(shift())), (return ''))
987 11 4 0 $self->{'_HTML_DOM_sheet'} ||= do { my $first_child = $self->firstChild; local *@; require CSS::DOM; 'CSS::DOM'->VERSION(0.03); CSS::DOM::parse($first_child ? $first_child->data : '') }
1275 4 0 0 $1 || length $2