Branch Coverage

blib/lib/Net/DNSBL/Client.pm
Criterion Covered Total %
branch 82 108 75.9


line true false branch
69 2 18 if (exists $$args{$possible_arg})
73 1 9 if (scalar %$args)
79 2 7 if (not $$self{'timeout'} =~ /^\d+$/ or $$self{'timeout'} <= 0)
83 7 0 unless $$self{'resolver'}
262 2 0 if (not $secs =~ /^\d+$/ or $secs <= 0)
278 1 15 if $$self{'in_flight'}
279 1 14 unless $ipaddr
280 1 13 unless $dnsbls
292 0 12 if $$self{'in_flight'}
293 0 12 unless $ip_or_domain
294 0 12 unless $dnsbls
297 2 22 if ($options and exists $$options{$opt}) { }
308 1 2 if ($options and exists $$options{'lookup_keys'} and ref $$options{'lookup_keys'} eq 'HASH')
318 1 12 unless $$self{'in_flight'}
326 17 5 if $$r{'hit'} or $$self{'return_all'}
366 1 11 if (exists $$lookup_keys{$domain} and $$lookup_keys{$domain} ne '') { }
373 1 21 if ($$e{'type'} eq 'txt') { }
375 0 1 unless ($sock1)
380 0 21 unless ($sock2)
384 0 22 if $sock1 and $sock2
388 1 11 if ($sock1)
392 11 1 if ($sock2)
410 0 24 if $expire < 1
413 12 12 unless scalar @ready
420 0 12 unless $pack
421 10 2 if ($self->_process_reply($domain, $pack))
425 0 12 if $got_a_hit and $$self{'early_exit'}
436 2 10 if ($rcode eq 'SERVFAIL' or $rcode eq 'NXDOMAIN')
438 0 4 if $$dnsbl{'hit'}
446 0 16 unless $rr->type eq 'A' or uc $rr->type eq 'TXT'
449 6 30 if $$dnsbl{'hit'} and $$dnsbl{'type'} eq 'match'
451 3 27 if ($$dnsbl{'type'} eq 'normal') { }
25 2 elsif ($$dnsbl{'type'} eq 'match') { }
1 1 elsif ($$dnsbl{'type'} eq 'mask') { }
1 0 elsif ($$dnsbl{'type'} eq 'txt') { }
452 0 3 unless $rr->type eq 'A'
455 0 25 unless $rr->type eq 'A'
456 14 11 unless $rr->address eq $$dnsbl{'data'}
459 0 1 unless $rr->type eq 'A'
464 0 1 if ($$dnsbl{'data'} =~ /^\d+$/) { }
472 0 1 unless $got & $mask
476 0 1 unless uc $rr->type eq 'TXT'
480 16 0 if ($this_rr_hit)
482 14 2 unless ($$dnsbl{'actual_hits'})
485 15 1 if ($rr->type eq 'A') { }
503 13 3 if ($addr =~ /(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/)
506 2 1 if ($addr =~ /:/)
519 0 2 if $addr eq '::'
520 2 0 if ($addr =~ /::/)
522 0 2 if $addr =~ /::.*::/
525 1 1 if $addr =~ /^::/
526 0 2 if $addr =~ /::$/
530 2 0 if ($colons < 8)
537 1 15 length $_ < 4 ? :