Condition Coverage

lib/HTML/Object/DOM/Element.pm
Criterion Covered Total %
condition 87 523 16.6


and 2 conditions

line l !l condition
1715 0 0 CORE::not defined $Nice::Try::WANTARRAY and scalar @Nice::Try::LAST_VAL
1718 0 0 CORE::not defined $Nice::Try::WANTARRAY and scalar @Nice::Try::LAST_VAL
1795 0 0 CORE::not defined $Nice::Try::WANTARRAY and scalar @Nice::Try::LAST_VAL
1798 0 0 CORE::not defined $Nice::Try::WANTARRAY and scalar @Nice::Try::LAST_VAL
1822 0 0 CORE::not defined $Nice::Try::WANTARRAY and scalar @Nice::Try::LAST_VAL
1825 0 0 CORE::not defined $Nice::Try::WANTARRAY and scalar @Nice::Try::LAST_VAL
1863 1 0 CORE::not defined $Nice::Try::WANTARRAY and scalar @Nice::Try::LAST_VAL
1866 0 0 CORE::not defined $Nice::Try::WANTARRAY and scalar @Nice::Try::LAST_VAL
1959 0 0 CORE::not defined $Nice::Try::WANTARRAY and scalar @Nice::Try::LAST_VAL
1962 0 0 CORE::not defined $Nice::Try::WANTARRAY and scalar @Nice::Try::LAST_VAL
2031 8 0 CORE::not defined $Nice::Try::WANTARRAY and scalar @Nice::Try::LAST_VAL
2034 0 0 CORE::not defined $Nice::Try::WANTARRAY and scalar @Nice::Try::LAST_VAL

and 3 conditions

line !l l&&!r l&&r condition
227 37 0 0 defined $a_anc->rank and defined $b_anc->rank
322 0 0 0 defined $id and CORE::length $id
386 0 0 19 defined $name and CORE::length "$name"
421 0 0 0 scalar @_ == 1 and CORE::not ref $_[0]
0 0 0 scalar @_ == 1 and $self->_is_array($this)
552 0 0 0 ref $this and overload::Overloaded($this)
0 0 0 ref $this and overload::Overloaded($this) and overload::Method($this, "\"\"")
607 0 0 0 ref $this and overload::Overloaded($this)
0 0 0 ref $this and overload::Overloaded($this) and overload::Method($this, "\"\"")
640 0 0 0 defined $pos and CORE::length "$pos"
646 0 0 0 defined $elem and ref $elem || CORE::length $elem
665 0 0 0 CORE::not $parent and $pos eq 'beforebegin' || $pos eq 'afterend'
714 0 0 0 defined $pos and CORE::length "$pos"
720 0 0 0 defined $html and CORE::length "$html"
725 0 0 0 ref $html and CORE::not overload::Method($html, "\"\"")
734 0 0 0 CORE::not $parent and $pos eq 'beforebegin' || $pos eq 'afterend'
803 0 0 0 defined $pos and CORE::length "$pos"
809 0 0 0 scalar @_ == 1 and CORE::not defined $_[0]
0 0 0 scalar @_ > 1 and CORE::not CORE::length($text = join("", @_))
819 0 0 0 ref $text and CORE::not overload::Method($text, "\"\"")
826 0 0 0 CORE::not $parent and $pos eq 'beforebegin' || $pos eq 'afterend'
879 0 0 72 $self->_is_object($elems[$i]) && $elems[$i]->isa('HTML::Object::Element')
0 72 0 ref $elems[$i] and CORE::not $self->_is_object($elems[$i]) && $elems[$i]->isa('HTML::Object::Element')
1117 0 0 2 ref $this and overload::Overloaded($this)
0 2 0 ref $this and overload::Overloaded($this) and overload::Method($this, "\"\"")
1149 0 0 0 CORE::not $children->is_empty and defined $pos
1258 0 0 3 ref $this and overload::Overloaded($this)
0 3 0 ref $this and overload::Overloaded($this) and overload::Method($this, "\"\"")
1409 0 0 0 defined $name and CORE::length $name
1519 0 0 3 defined $name and CORE::length $name
1575 0 0 4 defined $this and CORE::length $this
1602 2 0 0 ref $this and !$self->_is_object($this) || $self->_is_object($this) && !overload::Method($this, '""')
1665 0 0 0 defined $name and CORE::length $name
1683 0 0 0 defined $force and $force
1687 0 0 0 defined $force and CORE::not $force
1710 27 0 0 $INC{'threads.pm'} and CORE::not exists $INC{'forks.pm'}
1713 1 0 0 defined $link && CORE::length "$link"
1715 27 0 0 defined $Nice::Try::WANT and CORE::length $Nice::Try::WANT
1718 0 0 0 defined $Nice::Try::WANT and CORE::length $Nice::Try::WANT
0 0 27 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')
27 0 0 defined $Nice::Try::WANT and CORE::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')
1786 91 0 11 $def->{'callback'} and ref $def->{'callback'} eq "CODE"
1789 0 0 0 $INC{'threads.pm'} and CORE::not exists $INC{'forks.pm'}
1795 0 0 0 defined $Nice::Try::WANT and CORE::length $Nice::Try::WANT
1798 0 0 0 defined $Nice::Try::WANT and CORE::length $Nice::Try::WANT
0 0 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 CORE::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')
1815 31 0 0 $INC{'threads.pm'} and CORE::not exists $INC{'forks.pm'}
1822 31 0 0 defined $Nice::Try::WANT and CORE::length $Nice::Try::WANT
1825 0 0 0 defined $Nice::Try::WANT and CORE::length $Nice::Try::WANT
0 0 31 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')
31 0 0 defined $Nice::Try::WANT and CORE::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')
1837 41 0 1 $def->{'callback'} and ref $def->{'callback'} eq "CODE"
1858 1 0 0 $INC{'threads.pm'} and CORE::not exists $INC{'forks.pm'}
1863 1 0 0 defined $Nice::Try::WANT and CORE::length $Nice::Try::WANT
1866 0 0 0 defined $Nice::Try::WANT and CORE::length $Nice::Try::WANT
0 1 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 CORE::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 1 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')
1910 14 0 0 $INC{'threads.pm'} and CORE::not exists $INC{'forks.pm'}
1959 14 0 0 defined $Nice::Try::WANT and CORE::length $Nice::Try::WANT
1962 0 0 0 defined $Nice::Try::WANT and CORE::length $Nice::Try::WANT
0 0 14 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')
14 0 0 defined $Nice::Try::WANT and CORE::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')
1974 10 0 0 $INC{'threads.pm'} and CORE::not exists $INC{'forks.pm'}
2013 7 1 0 $prop eq "protocol" and $uri_class eq "URI::_generic"
2031 10 0 0 defined $Nice::Try::WANT and CORE::length $Nice::Try::WANT
2034 0 0 0 defined $Nice::Try::WANT and CORE::length $Nice::Try::WANT
0 8 2 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')
2 0 0 defined $Nice::Try::WANT and CORE::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 8 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
144 0 0 'HTML::Object::TokenList'->new($classes, 'element', $self, 'attribute', 'class') || (return $self->pass_error('HTML::Object::TokenList'->error))
237 46 6 $a_prev->getPreviousSibling || (return -1)
239 46 0 $a_next->getNextSibling || (return 1)
241 46 0 $b_prev->getPreviousSibling || (return 1)
243 29 0 $b_next->getNextSibling || (return -1)
259 1 0 'HTML::Object::ElementDataMap'->new($self) || (return $self->pass_error('HTML::Object::ElementDataMap'->error))
302 4 0 shift @_ || (return)
556 0 0 $p->parse_data("$this") || die('Error while parsing html data provided: ' . $p->error)
615 0 0 $self->new_text('value', $this) || die($self->error)
731 0 0 $self->new_parser || (return $self->pass_error)
732 0 0 $p->parse_data($html) || (return $self->pass_error($p->error))
986 79 0 0 'HTML::Object::DOM::Closing'->new(@_) || (return $self->pass_error('HTML::Object::DOM::Closing'->error))
1004 7 0 'HTML::Object::DOM::Comment'->new(@_) || (return $self->pass_error('HTML::Object::DOM::Comment'->error))
1013 3 0 0 'HTML::Object::DOM::Document'->new('debug', $self->debug) || (return $self->pass_error('HTML::Object::DOM::Document'->error))
1021 0 0 shift @_ || (return $self->error('No tag was provided to create an element.'))
1022 0 0 0 'HTML::Object'->get_definition($tag) || (return $self->pass_error('HTML::Object'->error))
1026 3 0 0 'HTML::Object::DOM::Element'->new({'is_empty', $dict->{'is_empty'}, 'tag', $dict->{'tag'}, 'debug', $self->debug}) || (return $self->pass_error('HTML::Object::DOM::Element'->error))
1035 0 0 3 'HTML::Object::DOM::NodeList'->new(@_) || (return $self->pass_error('HTML::Object::DOM::NodeList'->error))
1053 5 3 0 'HTML::Object::DOM::Space'->new(@_) || (return $self->pass_error('HTML::Object::DOM::Space'->error))
1062 14 0 0 'HTML::Object::DOM::Text'->new(@_) || (return $self->pass_error('HTML::Object::DOM::Text'->error))
1146 0 0 0 $p->parse_data("$this") || (return $self->error('Error while parsing html data provided: ', $p->error))
1266 0 0 $self->new_text('value', $this) || die($self->error)
1357 0 0 $self->find($sel, {'root', '.'}) || (return $self->pass_error({'class', 'HTML::Object::SyntaxError'}))
1377 0 0 $self->find($sel, {'root', './'}) || (return $self->pass_error({'class', 'HTML::Object::SyntaxError'}))
1426 0 0 shift @_ || (return $self->error({'message', 'No attribute node was provided to remove.', 'code', 500, 'class', 'HTML::Object::SyntaxError'}))
1462 0 0 $self->_list_to_nodes(@_) || (return $self->pass_error({'class', 'HTML::Object::SyntaxError'}))
1607 2 0 $p->parse_data("$this") || die('Error while parsing html data provided: ' . $p->error)
1780 1 175 $def->{'is_boolean'} //= 0

or 3 conditions

line l !l&&r !l&&!r condition
46 346 0 0 CORE::not exists $self->{'_internal_attribute_callbacks'} or ref $self->{'_internal_attribute_callbacks'} ne "HASH"
480 0 0 0 $self->isa("HTML::Object::Text") or $self->isa("HTML::Object::Comment")
0 0 0 $self->isa("HTML::Object::Text") or $self->isa("HTML::Object::Comment") or $self->isa("HTML::Object::Declaration")
485 0 0 0 CORE::not defined $tag or $tag eq "_document"
513 0 0 0 $self->parent || $self->new_root('root', $self)
552 0 0 0 CORE::not ref $this or ref $this and overload::Overloaded($this) and overload::Method($this, "\"\"")
607 0 0 0 CORE::not ref $this or ref $this and overload::Overloaded($this) and overload::Method($this, "\"\"")
646 0 0 0 ref $elem || CORE::length $elem
665 0 0 0 $pos eq 'beforebegin' || $pos eq 'afterend'
734 0 0 0 $pos eq 'beforebegin' || $pos eq 'afterend'
809 0 0 0 CORE::not scalar @_ or scalar @_ == 1 and CORE::not defined $_[0]
0 0 0 CORE::not scalar @_ or scalar @_ == 1 and CORE::not defined $_[0] or scalar @_ > 1 and CORE::not CORE::length($text = join("", @_))
826 0 0 0 $pos eq 'beforebegin' || $pos eq 'afterend'
890 0 0 284 exists $$obj{$parent->eid} or exists $$lit{$parent->tag}
1117 0 0 2 CORE::not ref $this or ref $this and overload::Overloaded($this) and overload::Method($this, "\"\"")
1258 0 0 0 CORE::not ref $this or ref $this and overload::Overloaded($this) and overload::Method($this, "\"\"")
1559 0 0 0 CORE::not $att->name->defined or $att->name->is_empty
1602 0 0 0 !$self->_is_object($this) || $self->_is_object($this) && !overload::Method($this, '""')
1718 27 0 0 defined $Nice::Try::WANTARRAY || defined $Nice::Try::BREAK && $Nice::Try::BREAK eq 'return'
0 27 0 !&Scalar::Util::blessed($Nice::Try::RETVAL[0]) || &Scalar::Util::blessed($Nice::Try::RETVAL[0]) && !$Nice::Try::RETVAL[0]->isa('Nice::Try::SENTINEL')
0 27 0 CORE::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')
1798 0 0 0 defined $Nice::Try::WANTARRAY || defined $Nice::Try::BREAK && $Nice::Try::BREAK eq 'return'
0 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 0 0 CORE::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')
1825 31 0 0 defined $Nice::Try::WANTARRAY || defined $Nice::Try::BREAK && $Nice::Try::BREAK eq 'return'
1 30 0 !&Scalar::Util::blessed($Nice::Try::RETVAL[0]) || &Scalar::Util::blessed($Nice::Try::RETVAL[0]) && !$Nice::Try::RETVAL[0]->isa('Nice::Try::SENTINEL')
0 31 0 CORE::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')
1866 1 0 0 defined $Nice::Try::WANTARRAY || defined $Nice::Try::BREAK && $Nice::Try::BREAK eq 'return'
0 0 1 !&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 CORE::not defined $Nice::Try::BREAK or $Nice::Try::BREAK eq "return"
0 0 1 !&Scalar::Util::blessed($Nice::Try::VOID[0]) || &Scalar::Util::blessed($Nice::Try::VOID[0]) && !$Nice::Try::VOID[0]->isa('Nice::Try::SENTINEL')
1931 1 1 10 $prop eq "username" or $prop eq "password"
1962 14 0 0 defined $Nice::Try::WANTARRAY || defined $Nice::Try::BREAK && $Nice::Try::BREAK eq 'return'
14 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 14 0 CORE::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')
1976 1 1 8 $prop eq "username" or $prop eq "password"
2015 0 0 0 $self->{'host'} or $self->{'port'}
2024 0 0 0 $self->{'username'} or $self->{'password'}
2034 10 0 0 defined $Nice::Try::WANTARRAY || defined $Nice::Try::BREAK && $Nice::Try::BREAK eq 'return'
2 0 8 !&Scalar::Util::blessed($Nice::Try::RETVAL[0]) || &Scalar::Util::blessed($Nice::Try::RETVAL[0]) && !$Nice::Try::RETVAL[0]->isa('Nice::Try::SENTINEL')
0 2 0 CORE::not defined $Nice::Try::BREAK or $Nice::Try::BREAK eq "return"
0 0 8 !&Scalar::Util::blessed($Nice::Try::VOID[0]) || &Scalar::Util::blessed($Nice::Try::VOID[0]) && !$Nice::Try::VOID[0]->isa('Nice::Try::SENTINEL')