Condition Coverage

lib/HTML/Object/DOM/Node.pm
Criterion Covered Total %
condition 84 290 28.9


and 2 conditions

line l !l condition
589 19 0 not defined $Nice::Try::WANTARRAY and scalar @Nice::Try::LAST_VAL
593 0 0 not defined $Nice::Try::WANTARRAY and scalar @Nice::Try::LAST_VAL
1363 0 0 not defined $Nice::Try::WANTARRAY and scalar @Nice::Try::LAST_VAL
1366 0 0 not defined $Nice::Try::WANTARRAY and scalar @Nice::Try::LAST_VAL

and 3 conditions

line !l l&&!r l&&r condition
102 7 0 0 $new_parent and not $self->_is_a($new_parent, "HTML::Object::DOM::Document")
7 0 0 $new_parent and not $self->_is_a($new_parent, "HTML::Object::DOM::Document") and not $self->_is_a($new_parent, "HTML::Object::DOM::DocumentFragment")
0 0 0 $new_parent and not $self->_is_a($new_parent, "HTML::Object::DOM::Document") and not $self->_is_a($new_parent, "HTML::Object::DOM::DocumentFragment") and not $self->_is_a($new_parent, "HTML::Object::DOM::Element")
6 1 0 $self->_is_a($new, 'HTML::Object::DOM::Text') || $self->_is_a($new, 'HTML::Object::DOM::Space') and $self->_is_a($new_parent, "HTML::Object::DOM::Document")
7 0 0 $self->isa("HTML::Object::DOM::Declaration") and not $self->_is_a($parent, "HTML::Object::DOM::Document")
7 0 0 $self->_is_a($parent, "HTML::Object::DOM::Document") and $self->_is_a($new, "HTML::Object::DOM::DocumentFragment")
7 0 0 $self->_is_a($parent, "HTML::Object::DOM::Document") and $self->_is_a($new, "HTML::Object::DOM::DocumentFragment") and $new->childElementCount > 1 || $new->children->grep(sub {
7 0 0 $self->_is_a($parent, "HTML::Object::DOM::Document") and $parent->childElementCount > 0
7 0 0 $self->_is_a($parent, "HTML::Object::DOM::Document") and $parent->childElementCount > 0 and $self->_is_a($new, "HTML::Object::DOM::Element")
7 0 0 $self->_is_a($new, "HTML::Object::DOM::Declaration") and $self->_is_a($nodes->last, "HTML::Object::DOM::Element")
221 0 0 1 defined $uri and length "$uri"
286 8 0 1 $self->nodeType == 2 and $elem->nodeType == 2
289 0 0 1 $self->ownerElement and $self->ownerElement eq $elem->ownerElement
324 0 0 58 $_->can("eid") and defined $_->eid
0 2 56 $_->can("eid") and defined $_->eid and defined $elem->eid
2 54 2 $_->can("eid") and defined $_->eid and defined $elem->eid and $_->eid eq $elem->eid
344 1 4 2 defined $parent_pos and defined $parent2_pos
371 7 0 0 $lineage->intersection($lineage2)->is_empty and $lineage2->intersection($lineage)->is_empty
419 0 10 0 $ancestor_siblings and $ancestor_siblings->has($elem)
475 2 3 0 $ancestor_siblings and $ancestor_siblings->has($elem)
499 0 0 40 defined $e and length $e
526 19 0 0 ref $this and $self->_is_object($this)
19 0 0 ref $this and $self->_is_object($this) and $this->isa("HTML::Object::DOM::Element")
558 19 0 0 ref $this and !overload::Overloaded($this) || overload::Overloaded($this) && !overload::Method($this, '""')
584 19 0 0 $INC{'threads.pm'} and not exists $INC{'forks.pm'}
589 19 0 0 defined $Nice::Try::WANT and length $Nice::Try::WANT
593 0 0 0 defined $Nice::Try::WANT and length $Nice::Try::WANT
0 19 0 defined $Nice::Try::WANTARRAY || defined $Nice::Try::BREAK && $Nice::Try::BREAK eq 'return' and !&Scalar::Util::blessed($Nice::Try::RETVAL[0]) || &Scalar::Util::blessed($Nice::Try::RETVAL[0]) && !$Nice::Try::RETVAL[0]->isa('Nice::Try::SENTINEL')
0 0 0 defined $Nice::Try::WANT and length $Nice::Try::WANT
0 0 0 defined $Nice::Try::RETVAL[0] and $Nice::Try::RETVAL[0] eq "__NEXT__"
0 0 0 defined $Nice::Try::RETVAL[0] and $Nice::Try::RETVAL[0] eq "__LAST__"
0 0 0 defined $Nice::Try::RETVAL[0] and $Nice::Try::RETVAL[0] eq "__REDO__"
0 0 0 defined $Nice::Try::BREAK and $Nice::Try::BREAK eq "return"
0 19 0 scalar @Nice::Try::VOID and !&Scalar::Util::blessed($Nice::Try::VOID[0]) || &Scalar::Util::blessed($Nice::Try::VOID[0]) && !$Nice::Try::VOID[0]->isa('Nice::Try::SENTINEL')
1031 1 0 4 defined $parent and $self->_is_a($parent, "HTML::Object::DOM::Element")
1081 1 0 0 $self->_is_a($new, 'HTML::Object::DOM::Text') || $self->_is_a($new, 'HTML::Object::DOM::Space') and $self->_is_a($new_parent, "HTML::Object::DOM::Document")
1 0 0 $self->isa("HTML::Object::DOM::Declaration") and not $self->_is_a($parent, "HTML::Object::DOM::Document")
1 0 0 $self->_is_a($parent, "HTML::Object::DOM::Document") and $self->_is_a($new, "HTML::Object::DOM::DocumentFragment")
1 0 0 $self->_is_a($parent, "HTML::Object::DOM::Document") and $self->_is_a($new, "HTML::Object::DOM::DocumentFragment") and $new->childElementCount > 1 || $new->children->grep(sub {
1 0 0 $self->_is_a($parent, "HTML::Object::DOM::Document") and $parent->childElementCount > 0
1 0 0 $self->_is_a($parent, "HTML::Object::DOM::Document") and $parent->childElementCount > 0 and $self->_is_a($new, "HTML::Object::DOM::Element")
0 0 0 $self->_is_a($parent, "HTML::Object::DOM::Document") and $parent->childElementCount > 0 and $self->_is_a($new, "HTML::Object::DOM::Element") and not $self->_is_a($old, 'HTML::Object::DOM::Element') && !$self->_is_a($old, 'HTML::Object::DOM::Element::HTML') && $parent->children->grep(sub {
0 1 0 $self->_is_a($new, "HTML::Object::DOM::Element") and $self->_is_a($old->previousSibling, "HTML::Object::DOM::Declaration")
1184 1 0 0 defined $newPos and not defined $oldPos
1258 0 0 2 defined $type and length "$type"
1292 0 0 0 ref $_ and overload::Method($_, "\"\"")
1323 0 0 0 defined $prev and $self->_is_a($prev, "HTML::Object::DOM::Text")
1359 19 0 0 $INC{'threads.pm'} and not exists $INC{'forks.pm'}
1363 19 0 0 defined $Nice::Try::WANT and length $Nice::Try::WANT
1366 0 0 0 defined $Nice::Try::WANT and length $Nice::Try::WANT
0 0 19 defined $Nice::Try::WANTARRAY || defined $Nice::Try::BREAK && $Nice::Try::BREAK eq 'return' and !&Scalar::Util::blessed($Nice::Try::RETVAL[0]) || &Scalar::Util::blessed($Nice::Try::RETVAL[0]) && !$Nice::Try::RETVAL[0]->isa('Nice::Try::SENTINEL')
19 0 0 defined $Nice::Try::WANT and length $Nice::Try::WANT
0 0 0 defined $Nice::Try::RETVAL[0] and $Nice::Try::RETVAL[0] eq "__NEXT__"
0 0 0 defined $Nice::Try::RETVAL[0] and $Nice::Try::RETVAL[0] eq "__LAST__"
0 0 0 defined $Nice::Try::RETVAL[0] and $Nice::Try::RETVAL[0] eq "__REDO__"
0 0 0 defined $Nice::Try::BREAK and $Nice::Try::BREAK eq "return"
0 0 0 scalar @Nice::Try::VOID and !&Scalar::Util::blessed($Nice::Try::VOID[0]) || &Scalar::Util::blessed($Nice::Try::VOID[0]) && !$Nice::Try::VOID[0]->isa('Nice::Try::SENTINEL')

or 2 conditions

line l !l condition
234 0 0 $root->createElement('base') || (return $self->error($root->pass_error))
235 0 0 $root->find('head')->first || (return $self->error('No base uri can be set, because there is no head element in this document.'))
261 10 0 shift @_ || (return $self->error('No element was provided to append.'))
489 2 0 shift @_ || (return $self->error('No element was provided to append.'))
566 19 0 $self->_xpath_value($this, $opts) || (return $self->pass_error)
592 0 0 $self->tag // ""
690 0 0 shift @_ || (return $self->error('No node was provided to insert.'))
733 2 0 shift @_ || (return $self->error('No node was provided to insert.'))
804 1 0 shift @_ || (return $self->error('No html element was provided to check for equality.'))
851 0 1 shift @_ || (return '')
862 0 0 'HTML::Object::DOM::Closing'->new(@_) || (return $self->pass_error('HTML::Object::DOM::Closing'->error))
871 0 0 'HTML::Object::DOM::Comment'->new(@_) || (return $self->pass_error('HTML::Object::DOM::Comment'->error))
880 0 0 'HTML::Object::DOM::Element'->new(@_) || (return $self->pass_error('HTML::Object::DOM::Element'->error))
889 0 0 'HTML::Object::DOM'->new('debug', $self->debug) || (return $self->pass_error('HTML::Object::DOM'->error))
898 0 0 'HTML::Object::DOM::Text'->new(@_) || (return $self->pass_error('HTML::Object::DOM::Text'->error))
1042 2 0 shift @_ || (return $self->error({'message', 'No element was provided to remove.', 'class', 'HTML::Object::TypeError'}))
1267 2 0 'HTML::Object::Event'->new($type, @_) || (return $self->pass_error('HTML::Object::Event'->error))
1316 0 0 $p->parse_data($_) || (return $self->pass_error({'class', 'HTML::Object::TypeError'}))

or 3 conditions

line l !l&&r !l&&!r condition
102 6 1 0 $self->_is_a($new, 'HTML::Object::DOM::DocumentFragment') || $self->_is_a($new, 'HTML::Object::DOM::Declaration') || $self->_is_a($new, 'HTML::Object::DOM::Element') || $self->_is_a($new, 'HTML::Object::DOM::CharacterData')
1 0 6 $self->_is_a($new, 'HTML::Object::DOM::Text') || $self->_is_a($new, 'HTML::Object::DOM::Space')
0 0 0 $new->childElementCount > 1 || $new->children->grep(sub {
296 8 0 0 $parent or $parent2
558 0 0 0 !overload::Overloaded($this) || overload::Overloaded($this) && !overload::Method($this, '""')
593 19 0 0 defined $Nice::Try::WANTARRAY || defined $Nice::Try::BREAK && $Nice::Try::BREAK eq 'return'
0 0 19 !&Scalar::Util::blessed($Nice::Try::RETVAL[0]) || &Scalar::Util::blessed($Nice::Try::RETVAL[0]) && !$Nice::Try::RETVAL[0]->isa('Nice::Try::SENTINEL')
0 0 0 not defined $Nice::Try::BREAK or $Nice::Try::BREAK eq "return"
0 0 19 !&Scalar::Util::blessed($Nice::Try::VOID[0]) || &Scalar::Util::blessed($Nice::Try::VOID[0]) && !$Nice::Try::VOID[0]->isa('Nice::Try::SENTINEL')
910 64 0 0 ref $self || $self
1081 0 1 0 $self->_is_a($old_parent, 'HTML::Object::DOM::Document') || $self->_is_a($old_parent, 'HTML::Object::DOM::DocumentFragment') || $self->_is_a($old_parent, 'HTML::Object::DOM::Element')
1 0 0 $self->_is_a($new, 'HTML::Object::DOM::DocumentFragment') || $self->_is_a($new, 'HTML::Object::DOM::Declaration') || $self->_is_a($new, 'HTML::Object::DOM::Element') || $self->_is_a($new, 'HTML::Object::DOM::CharacterData')
0 0 1 $self->_is_a($new, 'HTML::Object::DOM::Text') || $self->_is_a($new, 'HTML::Object::DOM::Space')
0 0 0 $new->childElementCount > 1 || $new->children->grep(sub {
0 0 0 $self->_is_a($old, 'HTML::Object::DOM::Element') && !$self->_is_a($old, 'HTML::Object::DOM::Element::HTML') && $parent->children->grep(sub {
1216 0 0 7 $self->isa("HTML::Object::DOM::Comment") or $self->isa("HTML::Object::DOM::Text")
0 7 0 $self->isa("HTML::Object::DOM::Comment") or $self->isa("HTML::Object::DOM::Text") or $self->isa("HTML::Object::DOM::Element")
1232 1 1 7 $self->isa("HTML::Object::DOM::Comment") or $self->isa("HTML::Object::DOM::Text")
2 7 0 $self->isa("HTML::Object::DOM::Comment") or $self->isa("HTML::Object::DOM::Text") or $self->isa("HTML::Object::DOM::Element")
1236 1 1 7 $self->isa("HTML::Object::DOM::Comment") or $self->isa("HTML::Object::DOM::Text")
1292 0 0 0 not ref $_ or ref $_ and overload::Method($_, "\"\"")
1366 19 0 0 defined $Nice::Try::WANTARRAY || defined $Nice::Try::BREAK && $Nice::Try::BREAK eq 'return'
19 0 0 !&Scalar::Util::blessed($Nice::Try::RETVAL[0]) || &Scalar::Util::blessed($Nice::Try::RETVAL[0]) && !$Nice::Try::RETVAL[0]->isa('Nice::Try::SENTINEL')
0 19 0 not defined $Nice::Try::BREAK or $Nice::Try::BREAK eq "return"
0 0 0 !&Scalar::Util::blessed($Nice::Try::VOID[0]) || &Scalar::Util::blessed($Nice::Try::VOID[0]) && !$Nice::Try::VOID[0]->isa('Nice::Try::SENTINEL')