Branch Coverage

File:blib/lib/Email/Abuse/Investigator.pm
Coverage:68.0%

line%coveragebranch
62550TFif ($HAS_CHI and not $_cache)
100TFif ($HAS_CHI and not $_cache)
74550TFif ref $text eq "SCALAR"
50TFif ref $text eq "SCALAR"
748100TFif ref $text
100TFif ref $text
752100TFif defined $text
100TFif defined $text
769100TFif defined $text and $text =~ /\S/
100TFif defined $text and $text =~ /\S/
1059100TFif $dom and not $seen{$dom}++
100TFif $dom and not $seen{$dom}++
1065100TFif $dom and not $seen{$dom}++
100TFif $dom and not $seen{$dom}++
113250TFunless ($dom)
100TFunless ($dom)
113650TFif $dom
100TFif $dom
1142100TFif $u->{'abuse'} and $u->{'abuse'} ne "(unknown)"
100TFif $u->{'abuse'} and $u->{'abuse'} ne "(unknown)"
1150100TFif $covered{$bare}
100TFif $covered{$bare}
1151100TFif $seen{"url:$bare"}++
0TFif $seen{"url:$bare"}++
1163100TFif $source =~ /^(?:From:|Return-Path:|Sender:) header$/
0TFif $source =~ /^(?:From:|Return-Path:|Sender:) header$/
1164100TFif $covered{lc $dom}
50TFif $covered{lc $dom}
116550TFif $seen{"dom:$dom"}++
50TFif $seen{"dom:$dom"}++
1374100TFif $self->{'_risk'}
50TFif $self->{'_risk'}
1393100TF$score >= $SCORE_LOW ? :
100TF$score >= $SCORE_MEDIUM ? :
100TF$score >= $SCORE_HIGH ? :
50TF$score >= $SCORE_LOW ? :
50TF$score >= $SCORE_MEDIUM ? :
0TF$score >= $SCORE_HIGH ? :
1768100TFif (@{$risk->{'flags'};})
50TFif (@{$risk->{'flags'};})
1778100TFif ($orig)
50TFif ($orig)
1787100TFif (@urls)
0TFif (@urls)
179250TFif $u->{'host'}
0TFif $u->{'host'}
1793100TFif $u->{'ip'} and $u->{'ip'} ne "(unresolved)"
0TFif $u->{'ip'} and $u->{'ip'} ne "(unresolved)"
1794100TFif $u->{'org'} and $u->{'org'} ne "(unknown)"
0TFif $u->{'org'} and $u->{'org'} ne "(unknown)"
179550TFif @meta
0TFif @meta
1802100TFif (@contacts)
0TFif (@contacts)
1809100TFif (my(@form_cs) = $self->form_contacts)
0TFif (my(@form_cs) = $self->form_contacts)
181550TFif $c->{'form_domain'}
0TFif $c->{'form_domain'}
181650TFif $c->{'form_paste'}
0TFif $c->{'form_paste'}
181750TFif $c->{'form_upload'}
0TFif $c->{'form_upload'}
2259100TFunless $form
0TFunless $form
2260100TFif $seen{$form}++
0TFif $seen{$form}++
2266100TFif ($orig)
0TFif ($orig)
2268100TFif ($pa and $pa->{'form'})
0TFif ($pa and $pa->{'form'})
2283100TFif $url_host_seen{$u->{'host'}}++
0TFif $url_host_seen{$u->{'host'}}++
2285100TFif ($pa and $pa->{'form'})
0TFif ($pa and $pa->{'form'})
2302100TFif ($pa and $pa->{'form'})
0TFif ($pa and $pa->{'form'})
2315100TFif ($d->{'registrar_abuse'} and $d->{'registrar_abuse'} =~ /\@([\w.-]+)/)
0TFif ($d->{'registrar_abuse'} and $d->{'registrar_abuse'} =~ /\@([\w.-]+)/)
2318100TFif ($rpa and $rpa->{'form'})
0TFif ($rpa and $rpa->{'form'})
2335100TF$val =~ /<([^>]*)>\s*$/ ? :
0TF$val =~ /<([^>]*)>\s*$/ ? :
2337100TFunless $addr_domain
0TFunless $addr_domain
2339100TFif $addr_spec =~ /\+SRS[0-9]?=/i
0TFif $addr_spec =~ /\+SRS[0-9]?=/i
2341100TFif ($pa and $pa->{'form'})
0TFif ($pa and $pa->{'form'})
2342100TF$addr_spec =~ /@/ ? :
0TF$addr_spec =~ /@/ ? :
2357100TFif ($auth->{'dkim_domain'})
0TFif ($auth->{'dkim_domain'})
2359100TFif ($pa and $pa->{'form'})
0TFif ($pa and $pa->{'form'})
2373100TFif ($unsub)
0TFif ($unsub)
2380100TFif ($pa and $pa->{'form'})
0TFif ($pa and $pa->{'form'})
2463100TFunless defined $v
0TFunless defined $v
2466100TF$decoded ne $v ? :
0TF$decoded ne $v ? :
2474100TFif (@{$risk->{'flags'};}) { }
0TFif (@{$risk->{'flags'};}) { }
2485100TFif (my $orig = $self->originating_ip) { }
0TFif (my $orig = $self->originating_ip) { }
2487100TFif $orig->{'rdns'}
0TFif $orig->{'rdns'}
2488100TFif $orig->{'country'}
0TFif $orig->{'country'}
2489100TFif $orig->{'org'}
0TFif $orig->{'org'}
249050TFif $orig->{'abuse'}
0TFif $orig->{'abuse'}
2492100TFif $orig->{'note'}
0TFif $orig->{'note'}
2500100TFif (@sw)
0TFif (@sw)
2510100TFunless defined $_->{'id'}
0TFunless defined $_->{'id'}
2512100TFif (@trail)
0TFif (@trail)
251850TFif $hop->{'for'}
0TFif $hop->{'for'}
2519100TFif $hop->{'id'}
0TFif $hop->{'id'}
2527100TFif (@urls) { }
2532100TFunless (exists $host_order{$h})
0TFunless (exists $host_order{$h})
2549100TF$URL_SHORTENERS{$bare} || $self->{'url_shorteners'}{$bare} ? :
0TF$URL_SHORTENERS{$bare} || $self->{'url_shorteners'}{$bare} ? :
2551100TFif $m->{'ip'}
0TFif $m->{'ip'}
2552100TFif $m->{'country'}
255350TFif $m->{'org'}
255450TFif $m->{'abuse'}
2556100TFif (@paths == 1) { }
2572100TFif (@mdoms) { }
2576100TFif ($d->{'recently_registered'})
2579100TFif $d->{'registered'}
2580100TFif $d->{'expires'}
2581100TFif $d->{'registrar'}
2582100TFif $d->{'registrar_abuse'}
2583100TFif ($d->{'web_ip'}) { }
2585100TFif $d->{'web_org'}
2586100TFif $d->{'web_abuse'}
2590100TFif ($d->{'mx_host'}) { }
259250TFif $d->{'mx_ip'}
259350TFif $d->{'mx_org'}
259450TFif $d->{'mx_abuse'}
2598100TFif ($d->{'ns_host'})
260050TFif $d->{'ns_ip'}
260150TFif $d->{'ns_org'}
260250TFif $d->{'ns_abuse'}
2614100TFif (@contacts) { }
261850TFif $c->{'note'}
2629100TFif (@form_cs)
263750TFif $c->{'form_domain'}
263850TFif $c->{'note'}
263950TFif ($c->{'form_paste'})
2645100TFif (defined $line and length "$line $w" > $ROLE_WRAP_LEN) { }
2649100TFdefined $line ? :
265250TFif defined $line
265350TFif @lines
265650TFif $c->{'form_upload'}
3712100TFif $host =~ /^\d{1,3}(?:\.\d{1,3}){3}$/
3715100TFif ($_cache)
3717100TFif defined $cached_ip
3722100TFif ($HAS_NET_DNS) { }
3731100TFif ($query)
3733100TFif ($rr->type eq 'A') { }
100TFelsif ($rr->type eq 'AAAA') { }
3742100TFif defined $ip
3747100TF$packed ? :
3751100TFif ($_cache)
3772100TFunless $ip
3774100TFif ($HAS_NET_DNS)
3777100TFif ($query)
3779100TFif $rr->type eq "PTR"
3810100TFif ($_cache)
3812100TFif $cached
3815100TF$HAS_LWP ? :
3818100TFunless ($result->{'org'})
3820100TFif ($raw)
3822100TF$ref ? :
3823100TFif $detail
3828100TFif $_cache and $result
3849100TFunless $server
3901100TFunless $HAS_LWP
3904100TFunless (defined $ua)
3910100TFif ($HAS_CONN_CACHE)
3923100TFunless $res and $res->is_success
3929100TFif ($j =~ /"name"\s*:\s*"([^"]+)"/)
3930100TFif ($j =~ /"handle"\s*:\s*"([^"]+)"/)
3933100TFif ($j =~ /"abuse".*?"email"\s*:\s*"([^"]+)"/s) { }
100TFelsif ($j =~ /"email"\s*:\s*"([^\@"]+\@[^"]+)"/) { }
3940100TFif ($j =~ /"country"\s*:\s*"([A-Z]{2})"/)
3974100TF$HAS_IO_SOCKET_IP ? :
3985100TFunless $sock
3988100TFunless ($sock->print("$query\r\n"))
4000100TFif ($@ or not defined $n or $n <= 0)
4001100TFif $@
4004100TFif not defined $n or $n <= 0
4326100TFunless defined $params and defined $params->{'name'}
4327100TFif ref $params->{'name'}