Condition Coverage

blib/lib/HTML/DOM.pm
Criterion Covered Total %
condition 85 109 77.9


and 3 conditions

line !l l&&!r l&&r condition
243 103 605 92 not $doc_elem->{'_HTML_DOM_no_mg'} and $tag =~ /^(?: button|(?: fieldse|inpu|(?:obj|sel)ec )t|label|textarea )\z/x
708 92 0 not $doc_elem->{'_HTML_DOM_no_mg'} and $tag =~ /^(?: button|(?: fieldse|inpu|(?:obj|sel)ec )t|label|textarea )\z/x and $doc_elem->{'_HTML_DOM_mg_f'}
0 9 1 $doc_elem->{'_HTML_DOM_cf'} && @{$doc_elem->{'_HTML_DOM_cf'};}
82 1 9 not $doc_elem->{'_HTML_DOM_no_mg'} and $tag =~ /^(?: button|(?: fieldse|inpu|(?:obj|sel)ec )t|label|textarea )\z/x and $doc_elem->{'_HTML_DOM_mg_f'} and not $doc_elem->{'_HTML_DOM_cf'} && @{$doc_elem->{'_HTML_DOM_cf'};}
359 842 6 12 (ref $tag ? $tag->tag : $tag) eq 'tr' and $self->pos->tag eq 'table'
392 0 1 8 $tagname eq 'doctype' and my $parent = $self->parent
500 2 0 13 $level and $level -= 1, 1
2 13 0 $level and $level -= 1, 1 and $self->{'_HTML_DOM_p'}
6 7 0 $level and $level -= 1, 1 and $self->{'_HTML_DOM_p'} and $self->{'_HTML_DOM_p'}[$level]
1053 12 66 0 $body and $body->tag =~ /^(?:body|frameset)\z/
1106 34 1 2 $tag eq 'a' and defined $_->attr('href')
1115 83 1 5 $tag eq 'a' and defined $_->attr('href')
1142 35 1 2 $_->tag eq 'a' && defined $_->attr('name')
1148 35 1 2 $_->tag eq 'a' && defined $_->attr('name')
1172 5 1 0 not $reqclone->can('header_field_names') and $reqclone->isa('HTTP::Headers')
1462 1 0 1 $base and $base =~ /^$URI::scheme_re:/o
1470 0 0 1 not defined $base and $uri =~ /^[Dd][Aa][Tt][Aa]:/

or 2 conditions

line l !l condition
313 7 33 $self->{'_HTML_DOM_cf'} ||= []
385 561 39 $self->{'_pos'} || (return @ret)
421 4 4 $opts{'response'}->request || (last)
426 4 4 $opts{'response'}->request || (last)
630 3 0 $_->{'_HTML_DOM_parser'}->parse_file($fh) || (return)
638 1 0 HTML::Encoding::encoding_from_html_document($contents) || 'iso-8859-1'
949 2 4 (shift())->body || (return '')
950 2 4 (shift())->body || (return '')
951 2 4 (shift())->body || (return '')
952 2 4 (shift())->body || (return '')
953 2 4 (shift())->body || (return '')
954 2 4 (shift())->body || (return '')
1275 237 30 $_[1] || ''
1341 4 9 $self->{'_HTML_DOM_doctype'} || ''
1376 1 0 $self->{'_HTML_DOM_loc'} || die(q[Can't assign to location without a location object])
1414 3 1 $_[0]{'_HTML_DOM_response'} || (return '')
1708 12 401 $_[0]{'_HTML_DOM_sheets'} or return

or 3 conditions

line l !l&&r !l&&!r condition
36 20063 238 3 $self->isa(scalar caller) or (caller)->isa('HTML::DOM::_TreeBuilder')
210 547 0 0 $parent->ownerDocument || $parent
616 0 0 5 ref $file or ref \$file eq 'GLOB'
702 0 7 0 $self->{'_HTML_DOM_p'}[$level - 1] ||= 'HTML::Parser'->new('start_h', [sub { $doc_elem->start(@_); } , 'tagname, attr, attrseq'], 'end_h', [sub { $doc_elem->end(@_); } , 'tagname, text'], 'text_h', [sub { $doc_elem->text(@_); } , 'text, is_cdata'])
724 29 74 0 $self->{'_HTML_DOM_parser'} || ($self->open, $self->{'_HTML_DOM_parser'})
1021 2 1 0 $doc->find('head') || ($doc->find('html') || $doc->appendChild($doc->createElement('html')))->appendChild($doc->createElement('head'))
1326 22 3 0 $doc->{'_HTML_DOM_sheets'} || ($doc->{'_HTML_DOM_sheets'} = (require CSS::DOM::StyleSheetList, 'CSS::DOM::StyleSheetList'->new), $doc->_populate_sheet_list, $doc->{'_HTML_DOM_sheets'})
1455 1 0 1 ($base) = $r->header('Content-Base') or ($base) = $r->header('Content-Location')