Branch Coverage

lib/HTML/Normalize.pm
Criterion Covered Total %
branch 97 120 80.8


line true false branch
218 19 0 unless (ref $self)
240 0 19 unless grep {$_ eq 'div';} @$bar
247 19 0 if $$self{'root'}
262 0 60 unless exists $paramTypes{$key}
263 0 60 if $paramTypes{$key}[0] < 2 and exists $$self{$key}
266 37 23 if ($paramTypes{$key}[0] < 2)
276 0 19 unless exists $paramTypes{$key}
277 0 19 unless exists $$self{$key}
278 19 0 if $paramTypes{$key}[0] != 1 or exists $$self{$key}
298 43 147 if exists $$self{$param}
299 13 134 if $paramTypes{$param}[0] > 1
301 0 134 if $paramTypes{$param}[0] == 1
322 0 23 unless defined $value
326 0 23 if exists $$self{'defaults'}{$tag}{$attrib} and $$self{'defaults'}{$tag}{$attrib} ne $value
332 9 14 if ($value =~ /^()()()$regex$/x) { }
352 11 8 if ($$self{-'selfrender'}) { }
358 3 5 if $$self{-'unformatted'}
359 0 8 if $$self{-'compact'}
363 7 1 unless ($$self{-'keepimplicit'})
368 12 0 ref $_ ? :
377 49 185 unless ref $parent and ref $$parent{'_content'}
387 205 205 unless ref $elt
389 17 188 if $self->_cleanedupElt($elt)
390 68 120 if exists $$elt{'_implicit'}
392 11 109 if $self->_removedDefaults($elt)
393 4 105 if $self->_distributedElements($elt)
394 0 105 if $self->_normalizedElements($elt)
395 1 104 if $self->_expeledBr($elt)
396 1 103 if $self->_removedEmpty($elt)
406 0 109 unless $$self{-'distribute'}
407 65 44 unless $$elt{'_tag'} =~ /$$self{'inline'}/ and $$elt{'_tag'} =~ /$$self{'needattr'}/
412 18 47 if ref $_
415 40 4 unless @elts and @elts == $blockElts
435 63 42 unless $$elt{'_tag'} =~ /$$self{'inline'}/
440 32 0 unless @elts == 1 and ref $elts[0] and $elts[0]{'_tag'} =~ /$$self{'block'}/
462 101 4 unless $$elt{'_tag'} eq 'a' and $$self{-'expelbr'}
463 0 4 unless exists $$elt{'_content'}
469 6 2 unless ref $br and $$br{'_tag'} eq 'br'
470 1 1 $index == 0 ? :
482 88 32 unless exists $$self{'defaults'}{$$elt{'_tag'}}
487 96 45 unless exists $$elt{$attrib}
493 19 26 if ('Regexp' eq ref $value) { }
494 5 14 unless $$elt{$attrib} =~ /$value/
497 0 20 unless defined $attr
503 6 20 unless $$elt{$attrib} eq $value
510 10 24 if @parentAttribs
520 67 69 if grep {not /^_/;} $elt->all_attr_names
521 57 12 unless $$elt{'_tag'} =~ /$$self{'needattr'}/
532 11 45 unless $$self{-'keepimplicit'} or not $$elt{'_implicit'} or $$elt{'_content'}
537 22 23 if (not $$self{-'keepimplicit'} and $$elt{'_implicit'}) { }
0 23 elsif ($$elt{'_tag'} =~ /$$self{'selfclose'}/) { }
7 16 elsif ($HTML::Tagset::isPhraseMarkup{$$elt{'_tag'}}) { }
567 0 39 if (length($$self{'line'}) + length($tail) + length($indent) > $$self{-'maxlinelen'}) { }
581 14 18 unless length $$self{'line'}
585 5 13 if ($$self{-'unformatted'}) { }
589 13 0 if ($$self{'ishead'})
620 18 45 if (not ref $subElt) { }
635 1 17 if ($$self{-'unformatted'}) { }
643 17 0 unless defined $str
644 0 17 unless defined $$self{'line'}