Condition Coverage

blib/lib/HTML/Defang.pm
Criterion Covered Total %
condition 87 137 63.5


and 3 conditions

line !l l&&!r l&&r condition
1159 6 0 663 defined $4 and $4 =~ /^([`"']?)(.*)\1$/s
1203 906 0 85 $$Self{'fix_mismatched_tags'} and $Defang != 1
1260 14 0 1 $EndRestartCommentsText and $CommentData =~ s/^(.*?)(>.*)$/$2/s
1494 202 108 107 not $IsAttr and $IsEndTag
1544 249 130 134 $Selector eq '' and $SelectorRule eq ''
1621 0 31 0 $V and $V > 127
1622 0 0 31 $V && $V < 1114111 && $V != 65535 && !($V > 55295 && $V < 57344)
1632 0 125 1 $V and $V > 127
1633 0 0 126 $V && $V < 1114111 && $V != 65535 && !($V > 55295 && $V < 57344)
1717 523 0 11 $$Self{'url_callback'} and $Value =~ /\s*url\(\s*((?:['"])?)(.*?)\1\s*\)/i
1743 310 0 0 $$Self{'Debug'} and $#Selectors > $#SelectorRules
1763 344 136 57 $k > 0 and not $v
1767 0 20 37 defined $$PrevExtra[4] and not $$PrevExtra[4] =~ /;/
1781 130 150 99 $$SelectorsIn[$Counter] and not $IsAttr
1875 628 0 16 $$Self{'url_callback'} and $AttribRule
628 10 6 $$Self{'url_callback'} and $AttribRule and exists $UrlRules{$AttribRule}
1888 644 0 0 $$Self{'attribs_callback'} and exists $$Self{'attribs_to_callback'}{$lcAttrKey}
1895 6 215 423 $DefangAttrib == 2 and $AttribRule
1942 306 0 318 defined $$Attr[7] and $$Attr[7] != 0
306 318 0 defined $$Attr[7] and $$Attr[7] != 0 and $$Self{'allow_double_defang'} || substr($$Attr[0] || '', 0, length $$Self{'defang_string'}) ne $$Self{'defang_string'}
1983 55 75 599 $DefangTag == 2 and my $TagOps = $Tags{$lcTag}
2001 15 42 2 @$OpenedTags and $InlineTags{$$OpenedTags[-1][0]}
2021 2 18 0 $ImplicitTags and !$$ImplicitTags{$LastTag} || $IsEndTag
2024 2 3 1 not $IsEndTag and $Tag eq $lcTag
2035 67 4 13 $IsEndTag and $IsTagToFix
2074 15 26 41 not $IsEndTag and $IsTagToFix
2082 17 39 0 $$HtmlR =~ m[\G(?=\s*
2092 0 0 2 $$POTD[0] eq 'span' && $$POTD[1] eq $SpanAttrs
2177 0 134 1 $V and $V > 127
2178 0 0 135 $V && $V < 1114111 && $V != 65535 && !($V > 55295 && $V < 57344)
2188 0 0 0 defined $1 && hex $1 < 1114111 && hex $1 != 65535 && !(hex $1 > 55295 && hex $1 < 57344)

or 2 conditions

line l !l condition
1620 31 0 defined $1 && hex $1 || undef
1631 125 0 defined $1 && hex $1 || defined $2 && int $2 || undef
1942 318 0 $$Attr[0] || ''
2176 61 0 defined $1 && hex $1 || defined $2 && int $2 || undef

or 3 conditions

line l !l&&r !l&&!r condition
761 0 23 0 ref $Proto || $Proto
1156 668 0 549 defined $1 or defined $4
1203 1 2 82 $Defang ||= $Self->track_tags(\$O, \$I, $TagOps, \$OpenAngle, $IsEndTag, $Tag, \$TagContent)
1209 0 155 0 $$Self{'allow_double_defang'} or substr($Tag, 0, length $$Self{'defang_string'}) ne $$Self{'defang_string'}
1255 14 1 3 $I =~ /\G(.*?)(\Q$ClosingCommentDelim\E!?\s*)(>)/cgis or $I =~ /\G(.*?)(--)(>)/cgis
1564 379 0 0 $Spaces or $IsAttr
1942 0 318 0 $$Self{'allow_double_defang'} || substr($$Attr[0] || '', 0, length $$Self{'defang_string'}) ne $$Self{'defang_string'}
1956 624 0 0 $QuoteRe{$$Attr[3]} || $QuoteRe{''}
2013 34 6 8 not $IsEndTag or $lcTag ne $LastTag
2021 6 0 12 !$$ImplicitTags{$LastTag} || $IsEndTag
2052 0 0 2 $$NestList{''} or $$NestList{$lcTag}
2220 0 0 0 defined $1 or defined $4