Condition Coverage

lib/HTML/Object/DOM/Document.pm
Criterion Covered Total %
condition 41 124 33.0


and 3 conditions

line !l l&&!r l&&r condition
170 1 0 1 $e->attributes->has("http-equiv") and $e->attributes->get("http-equiv") eq "Content-Type"
1 0 1 $e->attributes->has("http-equiv") and $e->attributes->get("http-equiv") eq "Content-Type" and $e->attributes->has("content")
175 0 0 1 defined $type and length $type
223 1 0 1 $e->attributes->has("http-equiv") and $e->attributes->get("http-equiv") eq "Content-Type"
1 0 1 $e->attributes->has("http-equiv") and $e->attributes->get("http-equiv") eq "Content-Type" and $e->attributes->has("content")
228 0 0 1 defined $type and length $type
421 14 0 0 not $html and Want::want("OBJECT")
492 0 0 19 defined $id and length $id
501 178 19 303 $elem->tag->substr(0, 1) eq "_" and not $self->_is_a($elem, "HTML::Object::Document")
503 161 17 19 $elem->attributes->has("id") and $elem->attributes->get("id") eq $id
530 0 0 0 defined $name and length "$name"
556 2 0 0 not $head and want("OBJECT")
889 0 0 0 ref $_ and not overload::Method($_, "\"\"")
961 0 0 0 scalar @_ == 1 and not defined $_[0]
969 0 0 0 $has_arg and defined $arg

or 2 conditions

line l !l condition
56 0 0 shift @_ || (return $self->error('No element object was provided to adopt into our document.'))
72 0 0 $self->_check_list_of_nodes_or_text(@_) || (return $self->pass_error)
102 13 0 $self->documentElement || die('Unable to find a top HTML tag')
122 0 0 $self->documentElement || die('Unable to find a top HTML tag')
166 2 0 $self->find('meta') || (return $self->pass_error)
178 1 0 $charset // ""
182 1 0 $e->attributes->get("charset") // ""
218 2 0 $self->find('meta') || (return $self->pass_error)
248 1 0 'HTML::Object::DOM::Attribute'->new($name, @_) || (return $self->pass_error('HTML::Object::DOM::Attribute'->error))
270 1 0 'HTML::Object::DOM::DocumentFragment'->new(@_) || (return $self->pass_error('HTML::Object::DOM::DocumentFragment'->error))
278 15 0 shift @_ || (return $self->error('No tag was provided to create an element.'))
298 14 1 $def->{'class'} //= ""
320 0 0 shift @_ || (return $self->error({'message', 'No event type was provided', 'class', 'HTML::Objct::SyntaxError'}))
325 0 0 'HTML::Object::Event'->new($type, @_) || (return $self->pass_error('HTML::Object::Event'->error))
338 0 0 'HTML::Object::DOM::XPathEvaluator'->new || (return $self->pass_error('HTML::Object::DOM::XPathEvaluator'->error))
369 1 0 'HTML::Object::DOM::Text'->new('value', $txt) || (return $self->pass_error('HTML::Object::DOM::Text'->error))
440 1 0 $self->find('embed') || (return $self->pass_error)
453 0 0 'HTML::Object::DOM::XPathEvaluator'->new || (return $self->pass_error('HTML::Object::DOM::XPathEvaluator'->error))
478 1 0 $self->find('form') || (return $self->pass_error)
531 0 0 $self->look_down('name', $name) || (return $self->pass_error)
532 0 0 $self->new_nodelist($results) || (return $self->pass_error)
554 2 0 $self->find('head') || (return $self->pass_error)
571 1 0 $self->find('img') || (return $self->pass_error)
582 1 0 'HTML::Object::DOM::Implementation'->new('debug', $self->debug) || (return $self->pass_error('HTML::Object::DOM::Implementation'->error))
604 1 0 $self->find('a') || (return $self->pass_error)
665 0 0 $self->_list_to_nodes('<html><head><title></title></head><body></body></html>') || (return $self->pass_error)
700 0 0 $self->_check_list_of_nodes_or_text(@_) || (return $self->pass_error)
802 1 0 $self->find('script') || (return $self->pass_error)
815 1 0 $self->find('link[rel="stylesheet"]') || (return $self->pass_error)
816 1 0 $self->find('stylesheet') || (return $self->pass_error)
828 2 0 $self->find('title') || die($self->error)
836 0 0 $self->find('title') || die($self->error)
840 0 0 $self->find('head') || die($self->error)
872 0 0 $self->body || (return $self->pass_error)
950 0 0 shift @_ || (return)

or 3 conditions

line l !l&&r !l&&!r condition
57 0 0 0 not $self->_is_a($elem, "HTML::Object::Element") or $self->_is_a($elem, "HTML::Object::Collection")
230 1 0 0 $hv->value->first // $default
988 0 0 0 $sig eq "__WARN__" or $sig eq "__DIE__"