Branch Coverage

blib/lib/Net/Whois/IP.pm
Criterion Covered Total %
branch 24 52 46.1


line true false branch
38 0 0 unless ($ip =~ /\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}/ or $ip =~ /^$Net::Whois::IP::IPv6_re$/)
41 10 0 unless (defined $reg)
69 8 10 if ($new_ip ne $ip or $new_registrar ne $registrar) { }
83 0 10 if ($raw_flag and $raw_flag ne '')
88 10 0 if (%{$whois_response_hash;}) { }
106 10 8 if ($registrar eq 'whois.arin.net') { }
2 6 elsif ($registrar eq 'whois.ripe.net' or $registrar eq 'whois.afrinic.net') { }
115 0 18 if ($#response < 0) { }
117 0 0 if ($i <= 3) { }
131 786 406 if ($line =~ /^(.+):\s+(.+)$/)
132 0 786 if ($multiple_flag and $multiple_flag ne '') { }
155 0 18 if ($search_options and $search_options->[0] ne '')
164 0 714 if (/Contact information can be found in the (\S+)\s+database/) { }
18 696 elsif (/OrgID:\s+(\S+)/i or /source:\s+(\S+)/i and not defined $hash_response->{$pattern1}) { }
10 686 elsif (/Parent:\s+(\S+)/) { }
0 686 elsif ($registrar eq 'ARIN' and /.+\((.+)\).+$/ and not $_ =~ /.+\:.+/) { }
172 14 4 if ($val =~ /^(?:RIPE|APNIC|KRNIC|LACNIC|AFRINIC)$/)
180 0 10 if ($1 ne '' and not defined $hash_response->{$pattern1} and not defined $hash_response->{$pattern2})
195 0 0 if ($origIp =~ /! NET-(\d{1,3}\-\d{1,3}\-\d{1,3}\-\d{1,3})/)
197 0 0 if ($ip =~ /! NET-(\d{1,3}\-\d{1,3}\-\d{1,3}\-\d{1,3})/)
199 0 0 if (pack('C4', split(/\-/, $orIP, 0)) ge pack('C4', split(/\-/, $nwIP, 0)))
204 0 0 unless ($ip =~ /\d{1,3}\-\d{1,3}\-\d{1,3}\-\d{1,3}/)
229 0 18 unless ($sock)
238 0 0 unless ($sock)
249 0 0 unless (defined $tmp_dir)
253 0 0 unless open DEBUG, ">>$outdebug"