Condition Coverage

lib/HTML/Object/XQuery.pm
Criterion Covered Total %
condition 54 632 8.5


and 2 conditions

line l !l condition
898 8 0 CORE::not defined $Nice::Try::WANTARRAY and scalar @Nice::Try::LAST_VAL
901 0 0 CORE::not defined $Nice::Try::WANTARRAY and scalar @Nice::Try::LAST_VAL
1570 0 0 CORE::not defined $Nice::Try::WANTARRAY and scalar @Nice::Try::LAST_VAL
1573 0 0 CORE::not defined $Nice::Try::WANTARRAY and scalar @Nice::Try::LAST_VAL
1586 0 0 ref $opts->{'headers'} eq 'HASH' && scalar keys %{$$opts{'headers'};}
1590 0 0 ref $opts->{'headers'} eq 'HASH' && scalar keys %{$$opts{'headers'};}
1638 0 0 CORE::not defined $Nice::Try::WANTARRAY and scalar @Nice::Try::LAST_VAL
1648 0 0 CORE::not defined $Nice::Try::WANTARRAY and scalar @Nice::Try::LAST_VAL
1752 0 0 CORE::not defined $Nice::Try::WANTARRAY and scalar @Nice::Try::LAST_VAL
1755 0 0 CORE::not defined $Nice::Try::WANTARRAY and scalar @Nice::Try::LAST_VAL

and 3 conditions

line !l l&&!r l&&r condition
115 0 0 0 $self->_is_object($context) and $context->isa("HTML::Object::DOM::Element")
157 1 0 0 ref $class and ref $class ne "CODE"
0 0 0 overload::Overloaded($class) && overload::Method($class, '""')
1 0 0 ref $class and ref $class ne "CODE" and CORE::not overload::Overloaded($class) && overload::Method($class, '""')
243 0 0 0 overload::Overloaded($val) && overload::Method($val, '""')
1 0 0 ref $val and CORE::not overload::Overloaded($val) && overload::Method($val, '""')
304 0 0 0 defined $context and !$self->_is_object($context) || $self->_is_object($context) && !$context->isa('HTML::Object::DOM::Element')
0 0 0 ref $this and $self->_is_object($this)
0 0 0 ref $this and $self->_is_object($this) and !$this->isa('HTML::Object::DOM::Element') || overload::Overloaded($this) && !overload::Method($this, '""')
336 0 0 0 defined $context and $elem->eid eq $context->eid
377 0 0 4 defined $name and CORE::length $name
410 0 26 0 !ref($name) || overload::Method($name, '""') and CORE::not defined $more
416 0 0 0 CORE::not defined $more and !ref($name) || overload::Method($name, '""')
446 0 0 0 defined $value && CORE::length $value
499 0 0 0 defined $ret and CORE::length $ret
512 0 0 0 overload::Overloaded($more) && overload::Method($more, '""')
26 0 0 ref $more and CORE::not overload::Overloaded($more) && overload::Method($more, '""')
526 0 0 26 defined $rule and $rule->elements->length > 0
617 0 0 0 defined $this and defined $val
0 0 0 defined $this and CORE::not defined $val
631 0 0 0 ref $this and !overload::Overloaded($this) || overload::Overloaded($this) && !overload::Method($this, '""')
646 0 0 0 substr($k, 0, 5) eq "data-" and CORE::length $k > 5
744 0 0 0 ref $this and overload::Overloaded($this)
0 0 0 ref $this and overload::Overloaded($this) and overload::Method($this, "\"\"")
751 0 0 0 $self->tag->substr(0, 1) ne "_" and $self->matches($xpath)
789 0 0 0 $self->_is_object($this) and !$this->isa('HTML::Object::DOM::Element') || $this->isa('HTML::Object::Element') && $this->tag->substr(0, 1) eq '_' && !$this->isa('HTML::Object::Collection')
837 8 0 0 ref $this and $self->_is_object($this)
8 0 0 ref $this and $self->_is_object($this) and $this->isa("HTML::Object::DOM::Element")
869 8 0 0 ref $this and !overload::Overloaded($this) || overload::Overloaded($this) && !overload::Method($this, '""')
893 8 0 0 $INC{'threads.pm'} and CORE::not exists $INC{'forks.pm'}
898 8 0 0 defined $Nice::Try::WANT and CORE::length $Nice::Try::WANT
901 0 0 0 defined $Nice::Try::WANT and CORE::length $Nice::Try::WANT
0 8 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 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')
966 0 0 0 ref $this and $self->_is_object($this)
0 0 0 ref $this and $self->_is_object($this) and $self->isa("HTML::Object::DOM::Element")
1006 0 0 0 ref $this and !overload::Overloaded($this) || overload::Overloaded($this) && !overload::Method($this, '""')
1086 0 0 0 ref $this eq "CODE" and CORE::not defined $code
1146 0 0 0 ref $this and overload::Overloaded($this)
0 0 0 ref $this and overload::Overloaded($this) and overload::Method($this, "\"\"")
1166 0 0 0 defined $html && CORE::length $html
0 0 0 ref $html and $self->_is_object($html)
0 0 0 ref $html and $self->_is_object($html) and $html->isa("HTML::Object::DOM::Element")
0 0 0 overload::Overloaded($html) && overload::Method($html, '""')
0 0 0 ref $html and CORE::not overload::Overloaded($html) && overload::Method($html, '""')
1175 0 0 0 $html->tag->substr(0, 1) eq "_" and CORE::not $html->isa_collection
1256 0 0 1 $first and $self->isa_element($first)
1273 0 0 0 ref $this and overload::Overloaded($this)
0 0 0 ref $this and overload::Overloaded($this) and overload::Method($this, "\"\"")
0 0 0 ref $this and $self->_is_object($this)
0 0 0 ref $this and $self->_is_object($this) and $this->isa("HTML::Object::DOM::Element")
1333 0 0 0 defined $elem and CORE::length $elem
1356 0 0 0 ref $this and $self->_is_object($this)
0 0 0 ref $this and $self->_is_object($this) and $this->isa("HTML::Object::DOM::Element")
0 0 0 ref $this and overload::Overloaded($this)
0 0 0 ref $this and overload::Overloaded($this) and overload::Method($this, "\"\"")
1506 0 1 0 scalar @_ == 1 and ref $_[0] eq "HASH"
1 0 0 scalar @_ > 2 and ref $_[-1] eq "HASH"
1517 0 1 0 CORE::not defined $complete and defined $data
1 0 0 CORE::not defined $complete and defined $data and ref $data eq "CODE"
1522 1 0 0 defined $data and ref $data ne "HASH"
1526 1 0 0 defined $complete and ref $complete ne "CODE"
1550 0 0 1 defined $url and CORE::length "$url"
1566 0 0 0 $INC{'threads.pm'} and CORE::not exists $INC{'forks.pm'}
1570 0 0 0 defined $Nice::Try::WANT and CORE::length $Nice::Try::WANT
1573 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')
1575 0 0 0 $INC{'threads.pm'} and CORE::not exists $INC{'forks.pm'}
1623 0 0 0 $resp->code >= 200 and $resp->code < 300
1638 0 0 0 defined $Nice::Try::WANT and CORE::length $Nice::Try::WANT
1648 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')
1724 0 0 0 $self->_is_object($e) and $e->isa("HTML::Object::DOM::Element")
1738 0 0 0 $self->_is_object($this) and overload::Overloaded($this)
0 0 0 $self->_is_object($this) and overload::Overloaded($this) and overload::Method("\"\"")
0 0 0 $self->_is_object($this) and $self->isa_collection($this)
0 0 0 $self->_is_object($this) and $this->isa("HTML::Object::DOM::Element")
1748 0 0 0 $INC{'threads.pm'} and CORE::not exists $INC{'forks.pm'}
1752 0 0 0 defined $Nice::Try::WANT and CORE::length $Nice::Try::WANT
1755 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')
1888 0 0 0 defined $val and CORE::length $val
0 0 0 defined $val and CORE::length $val and $ro->exists($prop)
2106 0 0 0 overload::Overloaded($_) && overload::Method($_, '""')
0 0 0 ref $_ and CORE::not overload::Overloaded($_) && overload::Method($_, '""')
2197 0 0 0 $self->_is_object($res) and $res->isa("HTML::Object::DOM::Element")
0 0 0 overload::Overloaded($res) and overload::Method($res, "\"\"")
2239 0 0 0 $self->_is_object($res) and $res->isa("HTML::Object::DOM::Element")
0 0 0 overload::Overloaded($res) and overload::Method($res, "\"\"")
2308 0 0 0 ref $this eq "CODE" and CORE::not defined $code
2324 0 0 0 defined $previous_val and CORE::length $previous_val
2337 0 0 0 defined $rule and $rule->elements->length > 0
2391 0 0 5 $first and $self->_is_a($first, "HTML::Object::DOM::Element")
2437 0 0 0 ref $this and overload::Overloaded($this)
0 0 0 ref $this and overload::Overloaded($this) and overload::Method($this, "\"\"")
2477 0 0 0 overload::Overloaded($res) and overload::Method($res, "\"\"")
2569 0 0 0 overload::Overloaded($this) and overload::Method($this, "\"\"")
2600 0 0 4 $e->children->length == 0 and $e->is_empty
2613 0 3 0 ref $more and CORE::not $more->isa("HTML::Object::DOM::Element")
2692 0 0 0 $self->_is_object($res) and $res->isa("HTML::Object::DOM::Element")
0 0 0 overload::Overloaded($res) and overload::Method($res, "\"\"")
2734 0 0 0 $self->_is_object($res) and $res->isa("HTML::Object::DOM::Element")
0 0 0 overload::Overloaded($res) and overload::Method($res, "\"\"")
2968 0 0 0 $self->_is_object($res) and $res->isa("HTML::Object::DOM::Element")
0 0 0 overload::Overloaded($res) and overload::Method($res, "\"\"")
3012 0 0 0 $self->_is_object($res) and $res->isa("HTML::Object::DOM::Element")
0 0 0 overload::Overloaded($res) and overload::Method($res, "\"\"")
3049 0 39 155 defined $this and $self->_is_object($this)
39 0 155 defined $this and $self->_is_object($this) and $this->isa("HTML::Object::DOM::Element")
3053 0 0 0 $self->length == $this->length and $self->length == $self->filter($this)->length

or 2 conditions

line l !l condition
106 0 0 $p->parse_data("$this") || (return $self->pass_error($p->error))
116 0 0 $context->find("$this") || (return $self->pass_error($context->error))
122 2 0 $HTML::Object::DOM::GLOBAL_DOM->find("$selector") || (return $self->pass_error($HTML::Object::DOM::GLOBAL_DOM->error))
163 1 0 $e->attr("class") // ""
202 0 0 $self->attr("class") // ""
562 12 0 $internal->{'css_cache'} //= {}
566 12 0 $internal->{'css_cache'}{'object'} || (return $self->error('CSS object could not be found in cache!'))
750 0 0 $self->_xpath_value("$this") || (return)
877 8 0 $self->_xpath_value($this) || (return $self->pass_error)
1014 0 0 $self->_xpath_value("$this") || (return)
1150 0 0 $p->parse_data("$this") || (return $self->error('Error while parsing html data provided: ', $p->error))
1559 0 0 $opts->{'timeout'} //= 10
1609 0 0 $doc->find($target) || (return $self->pass_error($doc->error))
1655 0 0 shift @_ || (return $self->error('No code reference was provided.'))
1673 6 0 'HTML::Object::DOM::Attribute'->new($opts) || (return $self->pass_error('HTML::Object::DOM::Attribute'->error))
1684 16 0 'HTML::Object::Collection'->new($opts) || (return $self->pass_error('HTML::Object::Collection'->error))
1696 0 0 'HTML::Object::DOM::Root'->new($opts) || (return $self->pass_error('HTML::Object::DOM::Root'->error))
1847 0 0 $e->parent || (return)
1857 0 0 $e->parent || (return)
2055 0 0 $self->_xpath_value(shift @_) || (return)
2163 0 0 shift @_ || (return $self->error('Nothing was provided to replace.'))
2168 0 0 $p->parse_data($this) || (return $self->pass_error($p->error))
2463 0 0 $ref //= {}
2464 0 0 $ref->{'toggle_status'} //= 0
2618 3 0 $HTML::Object::DOM::GLOBAL_DOM->find($this) || (return)
2631 3 0 $more->find($this) || (return 'HTML::Object::DOM'->pass_error($more->error))
2644 0 0 shift @_ || (return $self->error('Nothing was provided to append or prepend.'))
2658 0 0 $p->parse_data($this) || (return $self->pass_error($p->error))
2775 0 0 shift @_ || (return $self->error('No target was provided to insert element.'))
2793 0 0 $p->parse_data($this) || (return $self->pass_error($p->error))
2801 0 0 $self->find($this) || (return)
2907 3 0 shift @_ || (return $self->error('Nothing was provided to insert before or after.'))
2921 3 0 $p->parse_data($this) || (return $self->pass_error($p->error))
3126 0 0 shift @_ || (return $self->error('No target was provided to insert element.'))
3142 0 0 $p->parse_data($this) || (return $self->pass_error($p->error))
3150 0 0 $self->find($this) || (return)

or 3 conditions

line l !l&&r !l&&!r condition
92 2 0 0 CORE::not ref $this or overload::Method($this, "\"\"")
304 0 0 0 !$self->_is_object($context) || $self->_is_object($context) && !$context->isa('HTML::Object::DOM::Element')
0 0 0 !$this->isa('HTML::Object::DOM::Element') || overload::Overloaded($this) && !overload::Method($this, '""')
375 4 0 0 $self->isa_element || $self->isa_collection
0 0 4 CORE::not $self->isa_element || $self->isa_collection or $self->tag->substr(0, 1) eq "_"
410 0 0 26 $self->_is_array($name) or $self->_is_hash($name)
26 0 0 !ref($name) || overload::Method($name, '""')
0 0 26 $self->_is_array($name) or $self->_is_hash($name) or !ref($name) || overload::Method($name, '""') and CORE::not defined $more
416 0 0 0 !ref($name) || overload::Method($name, '""')
631 0 0 0 !overload::Overloaded($this) || overload::Overloaded($this) && !overload::Method($this, '""')
744 0 0 0 CORE::not ref $this or ref $this and overload::Overloaded($this) and overload::Method($this, "\"\"")
0 0 0 $self->_is_array($this) or $self->_is_object($this)
789 0 0 0 !$this->isa('HTML::Object::DOM::Element') || $this->isa('HTML::Object::Element') && $this->tag->substr(0, 1) eq '_' && !$this->isa('HTML::Object::Collection')
869 0 0 0 !overload::Overloaded($this) || overload::Overloaded($this) && !overload::Method($this, '""')
901 8 0 0 defined $Nice::Try::WANTARRAY || defined $Nice::Try::BREAK && $Nice::Try::BREAK eq 'return'
0 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 0 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')
1006 0 0 0 !overload::Overloaded($this) || overload::Overloaded($this) && !overload::Method($this, '""')
1146 0 0 0 CORE::not ref $this or ref $this and overload::Overloaded($this) and overload::Method($this, "\"\"")
1196 0 0 0 $p->parse_data("$html") || do {
1273 0 0 0 CORE::not ref $this or ref $this and overload::Overloaded($this) and overload::Method($this, "\"\"")
1356 0 0 0 CORE::not ref $this or ref $this and overload::Overloaded($this) and overload::Method($this, "\"\"")
1573 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')
1593 0 0 0 $resp->header("Client-Warning") or CORE::not $resp->is_success
1648 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')
1725 0 0 0 CORE::not $e->isa("HTML::Object::DOM::Comment") or $e->isa("HTML::Object::DOM::Text")
0 0 0 CORE::not $e->isa("HTML::Object::DOM::Comment") or $e->isa("HTML::Object::DOM::Text") or $e->isa("HTML::Object::DOM::Declaration")
0 0 0 CORE::not $e->isa("HTML::Object::DOM::Comment") or $e->isa("HTML::Object::DOM::Text") or $e->isa("HTML::Object::DOM::Declaration") or $e->isa("HTML::Object::DOM::Space")
1738 0 0 0 CORE::not ref $this or $self->_is_object($this) and overload::Overloaded($this) and overload::Method("\"\"")
1755 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')
1900 0 0 0 $p->parse_data($val) || do {
1928 0 0 0 $p->parse_data($val) || do {
2469 0 0 0 $ref->{'original_classes'} //= $classes
2477 0 0 0 CORE::not ref $res or overload::Overloaded($res) and overload::Method($res, "\"\"")
2569 7 0 0 CORE::not ref $this or overload::Overloaded($this) and overload::Method($this, "\"\"")
2574 6 0 0 $p->parse_data($this) || do {
2613 1 0 3 CORE::not ref $more or ref $more and CORE::not $more->isa("HTML::Object::DOM::Element")