lib/HTML/Object.pm | |||
---|---|---|---|
Criterion | Covered | Total | % |
condition | 55 | 269 | 20.4 |
line | l | !l | condition |
---|---|---|---|
560 | 44 | 0 | not defined $Nice::Try::WANTARRAY and scalar @Nice::Try::LAST_VAL |
563 | 0 | 0 | not defined $Nice::Try::WANTARRAY and scalar @Nice::Try::LAST_VAL |
669 | 0 | 0 | not defined $Nice::Try::WANTARRAY and scalar @Nice::Try::LAST_VAL |
672 | 0 | 0 | not defined $Nice::Try::WANTARRAY and scalar @Nice::Try::LAST_VAL |
681 | 0 | 0 | exists $opts->{'headers'} && defined $opts->{'headers'} && ref $opts->{'headers'} eq 'HASH' && scalar keys %{$$opts{'headers'};} |
692 | 0 | 0 | not defined $Nice::Try::WANTARRAY and scalar @Nice::Try::LAST_VAL |
695 | 0 | 0 | not defined $Nice::Try::WANTARRAY and scalar @Nice::Try::LAST_VAL |
line | !l | l&&!r | l&&r | condition |
---|---|---|---|---|
553 | 44 | 0 | 0 | $INC{'threads.pm'} and not exists $INC{'forks.pm'} |
560 | 44 | 0 | 0 | defined $Nice::Try::WANT and length $Nice::Try::WANT |
563 | 0 | 0 | 0 | defined $Nice::Try::WANT and length $Nice::Try::WANT |
0 | 44 | 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 | 44 | 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') | |
566 | 44 | 0 | 0 | length $self->{'current_parent'} and $self->_is_object($self->{'current_parent'}) |
644 | 0 | 0 | 0 | scalar @_ == 1 and ref $_[0] ne "HASH" |
0 | 0 | 0 | scalar @_ > 1 and @_ % 2 || scalar @_ == 2 && ref $_[1] eq 'HASH' | |
655 | 0 | 0 | 0 | defined $opts->{'uri'} and length $opts->{'uri'} |
665 | 0 | 0 | 0 | $INC{'threads.pm'} and not exists $INC{'forks.pm'} |
669 | 0 | 0 | 0 | defined $Nice::Try::WANT and length $Nice::Try::WANT |
672 | 0 | 0 | 0 | defined $Nice::Try::WANT and 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 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') | |
675 | 0 | 0 | 0 | $INC{'threads.pm'} and not exists $INC{'forks.pm'} |
692 | 0 | 0 | 0 | defined $Nice::Try::WANT and length $Nice::Try::WANT |
695 | 0 | 0 | 0 | defined $Nice::Try::WANT and 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 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') | |
714 | 217 | 104 | 0 | $e->is_empty and $e->children->length |
217 | 99 | 5 | $e->is_empty and not $e->attributes->exists("/") | |
748 | 0 | 0 | 0 | $e->is_empty and $e->children->length |
0 | 0 | 0 | $e->is_empty and not $e->attributes->exists("/") | |
0 | 0 | 0 | not $e->is_empty and $e->attributes->exists("/") | |
782 | 0 | 0 | 0 | &Scalar::Util::blessed($html) and $html->isa("HTML::Object::Document") |
801 | 0 | 0 | 138 | defined $elem and $self->_is_a($elem, "HTML::Object::DOM::Document") |
818 | 92 | 44 | 2 | $state eq "complete" and my $code = $elem->onload |
line | l | !l | condition |
---|---|---|---|
210 | 7 | 0 | $self->new_comment({'column', $opts->{'col'}, 'line', $opts->{'line'}, 'offset', $opts->{'offset'}, 'original', $opts->{'raw'}, 'parent', $parent, 'value', $val, 'debug', $self->debug}) || (return) |
282 | 0 | 0 | $self->new_element({'attributes', $opts->{'attr'}, 'attributes_sequence', $opts->{'seq'}, 'column', $opts->{'col'}, 'is_empty', $def->{'is_empty'}, 'line', $opts->{'line'}, 'offset', $opts->{'offset'}, 'original', $opts->{'raw'}, 'parent', $parent, 'tag', $opts->{'tag'}, 'debug', $self->debug}) || (return) |
315 | 217 | 0 | $self->new_closing({'attributes', $opts->{'attr'}, 'attributes_sequence', $opts->{'seq'}, 'column', $opts->{'col'}, 'line', $opts->{'line'}, 'offset', $opts->{'offset'}, 'original', $opts->{'raw'}, 'tag', $opts->{'tag'}, 'debug', $self->debug}) || (return) |
329 | 369 | 0 | $self->new_space($opts) || (return) |
370 | 300 | 21 | $def->{'class'} //= "" |
390 | 278 | 0 | $self->new_special($def->{'class'}, $params) || (return) |
394 | 43 | 0 | $self->new_element($params) || (return) |
412 | 484 | 0 | $self->current_parent || (return $self->error('You must create a document first using the new_document() method first before adding text.')) |
426 | 369 | 0 | $self->add_space('original', $opts->{'raw'}, 'column', $opts->{'col'}, 'line', $opts->{'line'}, 'offset', $opts->{'offset'}, 'parent', $parent, 'value', $opts->{'raw'}, 'debug', $self->debug) || (return) |
440 | 115 | 0 | $self->new_text({'column', $opts->{'col'}, 'line', $opts->{'line'}, 'offset', $opts->{'offset'}, 'original', $opts->{'raw'}, 'parent', $parent, 'value', $opts->{'raw'}, 'debug', $self->debug}) || (return) |
467 | 19 | 0 | 'HTML::Object::Closing'->new(@_) || (return $self->pass_error('HTML::Object::Closing'->error)) |
475 | 1 | 0 | 'HTML::Object::Comment'->new(@_) || (return $self->pass_error('HTML::Object::Comment'->error)) |
483 | 0 | 0 | 'HTML::Object::Declaration'->new(@_) || (return $self->pass_error('HTML::Object::Declaration'->error)) |
491 | 3 | 0 | 'HTML::Object::Document'->new(@_) || (return $self->pass_error('HTML::Object::Document'->error)) |
499 | 35 | 0 | 'HTML::Object::Element'->new(@_) || (return $self->pass_error('HTML::Object::Element'->error)) |
507 | 37 | 0 | 'HTML::Object::Space'->new(@_) || (return $self->pass_error('HTML::Object::Space'->error)) |
517 | 292 | 0 | $class->new(@_) || (return $self->pass_error($class->error)) |
524 | 8 | 0 | 'HTML::Object::Text'->new(@_) || (return $self->pass_error('HTML::Object::Text'->error)) |
601 | 5 | 0 | shift @_ || (return $self->error('No file to parse was provided.')) |
614 | 5 | 0 | $f->open('<', $params) || (return $self->error(qq[Unable to open file to parse "$file": ], $f->error)) |
664 | 0 | 0 | $opts->{'timeout'} //= 10 |
line | l | !l&&r | !l&&!r | condition |
---|---|---|---|---|
87 | 0 | 0 | 6 | $_[$i] eq "debug" or $_[$i] eq "debug_code" |
0 | 0 | 6 | $_[$i] eq "debug" or $_[$i] eq "debug_code" or $_[$i] eq "debug_file" | |
0 | 0 | 6 | $_[$i] eq "debug" or $_[$i] eq "debug_code" or $_[$i] eq "debug_file" or $_[$i] eq "fatal_error" | |
0 | 2 | 4 | $_[$i] eq "debug" or $_[$i] eq "debug_code" or $_[$i] eq "debug_file" or $_[$i] eq "fatal_error" or $_[$i] eq "global_dom" | |
2 | 0 | 4 | $_[$i] eq "debug" or $_[$i] eq "debug_code" or $_[$i] eq "debug_file" or $_[$i] eq "fatal_error" or $_[$i] eq "global_dom" or $_[$i] eq "try_catch" | |
120 | 0 | 2 | 0 | ref $class || $class |
248 | 0 | 0 | 98 | length $opts->{'raw'} or defined $opts->{'tag'} |
534 | 0 | 0 | 12 | ref $this eq "CODE" or ref $this eq "GLOB" |
0 | 11 | 1 | ref $this eq "CODE" or ref $this eq "GLOB" or "$this" =~ /<\w+/ | |
11 | 0 | 1 | ref $this eq "CODE" or ref $this eq "GLOB" or "$this" =~ /<\w+/ or length "$this" > 1024 | |
563 | 44 | 0 | 0 | defined $Nice::Try::WANTARRAY || defined $Nice::Try::BREAK && $Nice::Try::BREAK eq 'return' |
0 | 0 | 44 | !&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 | 44 | !&Scalar::Util::blessed($Nice::Try::VOID[0]) || &Scalar::Util::blessed($Nice::Try::VOID[0]) && !$Nice::Try::VOID[0]->isa('Nice::Try::SENTINEL') | |
644 | 0 | 0 | 0 | @_ % 2 || scalar @_ == 2 && ref $_[1] eq 'HASH' |
0 | 0 | 0 | scalar @_ == 1 and ref $_[0] ne "HASH" or scalar @_ > 1 and @_ % 2 || scalar @_ == 2 && ref $_[1] eq 'HASH' | |
672 | 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 | 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') | |
682 | 0 | 0 | 0 | $resp->header("Client-Warning") or not $resp->is_success |
695 | 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 | 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') | |
713 | 0 | 486 | 321 | $e->isa("HTML::Object::Closing") or $e->tag->substr(0, 1) eq "_" |
714 | 99 | 217 | 0 | $e->is_empty || $e->is_closed |
747 | 0 | 0 | 0 | $e->isa("HTML::Object::Closing") or $e->tag->substr(0, 1) eq "_" |
748 | 0 | 0 | 0 | $e->is_empty || $e->is_closed |