Branch Coverage

blib/lib/App/SpamcupNG/HTMLParse.pm
Criterion Covered Total %
branch 71 90 78.8


line true false branch
65 0 4 unless ref $content_ref eq "SCALAR"
82 0 251 if $content eq ""
84 1 250 if ($content =~ /$mailer_regex/)
91 4 246 if ($content =~ /$content_type_regex/)
96 3 1 if (scalar @wanted > 1) { }
104 1 2 if (substr($charset, 0, length $not_useful) eq $not_useful) { }
117 1 0 if substr($wanted, -1) eq ";"
124 1 0 if $info{'mailer'} and $info{'content_type'}
145 0 2 unless ref $content_ref eq "SCALAR"
153 49 21 unless ref $content eq "SCALAR"
156 2 19 if $$content eq ""
158 2 17 if ($$content =~ /$regexes{'message_age'}/)
160 2 0 if substr($unit, -1) eq "s"
181 1 2 unless ref $content_ref eq "SCALAR"
189 2 2 if ($element->as_trimmed_text eq "Report Now")
191 2 0 if ($element->attr("href") =~ /$regexes{'next_id'}/)
195 0 2 unless $length == $expected
219 1 2 unless ref $content_ref eq "SCALAR"
233 9 7 if (ref $next) { }
234 7 2 if $next->tag eq "br"
235 2 0 if $next->tag eq "div"
260 1 6 unless ref $content_ref eq "SCALAR"
272 23 2 if (ref $next) { }
273 7 16 if $next->tag eq "br"
274 2 14 if $next->tag eq "div"
288 1 5 if (@nodes)
289 1 0 if ($nodes[0]->as_trimmed_text eq "Bounce error")
295 5 3 unless ref $node eq ""
321 1 3 unless ref $content_ref eq "SCALAR"
331 88 42 if ref $html_element
333 2 40 if (index($html_element, "Using best contacts") == 0)
360 0 2 unless ref $content_ref eq "SCALAR"
371 2 0 if ($node->as_trimmed_text eq $expected)
377 2 0 if ($parent)
381 0 2 if (scalar @nodes != 1 or ref $nodes[0] ne "HTML::Element")
391 8 10 if (ref $header->[$i] eq "HTML::Element")
395 6 2 unless $header->[$i]->content
397 0 2 unless $content
398 0 2 if ref $content
401 2 10 unless $header->[$i]
406 0 10 if ($formatted) { }
434 0 2 unless ref $content_ref eq "SCALAR"
447 6 4 if ref $inner
455 3 1 if (substr($inner, 0, length $devnull) eq $devnull) { }
1 0 elsif (substr($inner, 0, length $report_sent) eq $report_sent) { }