Branch Coverage

blib/lib/Geo/IP2Proxy.pm
Criterion Covered Total %
branch 65 302 21.5


line true false branch
90 0 2 unless @_ > 1 and $_[1]
94 0 2 unless CORE::open $handle, "$dbFile"
103 0 0 if (CORE::close $class->{'filehandle'}) { }
146 3 3 if ($ipv == 4) { }
149 3 0 if ($ipv == 6) { }
161 0 0 if ($ipv == 4) { }
164 0 0 if ($ipv == 6) { }
176 0 0 if ($ipv == 4) { }
179 0 0 if ($ipv == 6) { }
191 0 0 if ($ipv == 4) { }
194 0 0 if ($ipv == 6) { }
206 0 0 if ($ipv == 4) { }
209 0 0 if ($ipv == 6) { }
221 0 0 if ($ipv == 4) { }
224 0 0 if ($ipv == 6) { }
236 0 0 if ($ipv == 4) { }
239 0 0 if ($ipv == 6) { }
251 0 0 if ($ipv == 4) { }
254 0 0 if ($ipv == 6) { }
266 0 0 if ($ipv == 4) { }
269 0 0 if ($ipv == 6) { }
281 0 0 if ($ipv == 4) { }
284 0 0 if ($ipv == 6) { }
296 0 0 if ($ipv == 4) { }
299 0 0 if ($ipv == 6) { }
311 0 0 if ($ipv == 4) { }
314 0 0 if ($ipv == 6) { }
326 0 0 if ($ipv == 4) { }
329 0 0 if ($ipv == 6) { }
341 0 0 if ($ipv == 4) { }
344 0 0 if ($ipv == 6) { }
358 0 3 if ($ipnum eq '')
359 0 0 if ($mode == 100) { }
362 0 0 if ($mode == 7) { }
370 0 3 if ($mode == 1 and $IPV6_COUNTRY_POSITION[$dbtype] == 0)
373 0 3 if ($mode == 2 and $IPV6_COUNTRY_POSITION[$dbtype] == 0)
376 0 3 if ($mode == 3 and $IPV6_REGION_POSITION[$dbtype] == 0)
379 0 3 if ($mode == 4 and $IPV6_CITY_POSITION[$dbtype] == 0)
382 0 3 if ($mode == 5 and $IPV6_ISP_POSITION[$dbtype] == 0)
385 0 3 if ($mode == 6 and $IPV6_PROXYTYPE_POSITION[$dbtype] == 0)
388 0 3 if ($mode == 8 and $IPV6_DOMAIN_POSITION[$dbtype] == 0)
391 0 3 if ($mode == 9 and $IPV6_USAGETYPE_POSITION[$dbtype] == 0)
394 0 3 if ($mode == 10 and $IPV6_ASN_POSITION[$dbtype] == 0)
397 0 3 if ($mode == 11 and $IPV6_AS_POSITION[$dbtype] == 0)
400 0 3 if ($mode == 12 and $IPV6_LASTSEEN_POSITION[$dbtype] == 0)
403 0 3 if ($mode == 13 and $IPV6_THREAT_POSITION[$dbtype] == 0)
414 0 3 if ($dbcount == 0)
415 0 0 if ($mode == 100) { }
429 3 0 if ($indexbaseaddr > 0)
440 0 3 if ($realipno == '340282366920938463463374607431768211455')
448 3 1 if ($ipno >= $ipfrom and $ipno < $ipto) { }
455 0 3 if ($mode == 100)
470 0 0 if ($IPV6_COUNTRY_POSITION[$dbtype] != 0)
474 0 0 if ($IPV6_REGION_POSITION[$dbtype] != 0)
477 0 0 if ($IPV6_CITY_POSITION[$dbtype] != 0)
480 0 0 if ($IPV6_ISP_POSITION[$dbtype] != 0)
483 0 0 if ($IPV6_PROXYTYPE_POSITION[$dbtype] != 0)
486 0 0 if ($IPV6_DOMAIN_POSITION[$dbtype] != 0)
489 0 0 if ($IPV6_USAGETYPE_POSITION[$dbtype] != 0)
492 0 0 if ($IPV6_ASN_POSITION[$dbtype] != 0)
495 0 0 if ($IPV6_AS_POSITION[$dbtype] != 0)
498 0 0 if ($IPV6_LASTSEEN_POSITION[$dbtype] != 0)
501 0 0 if ($IPV6_THREAT_POSITION[$dbtype] != 0)
504 0 0 if ($countryshort eq '-' or $proxytype eq '-') { }
507 0 0 if ($proxytype eq 'DCH' or $proxytype eq 'SES') { }
515 3 0 if ($mode == 1)
518 0 0 if ($mode == 2)
521 0 0 if ($mode == 3)
524 0 0 if ($mode == 4)
527 0 0 if ($mode == 5)
530 0 0 if ($mode == 6)
533 0 0 if ($mode == 8)
536 0 0 if ($mode == 9)
539 0 0 if ($mode == 10)
542 0 0 if ($mode == 11)
545 0 0 if ($mode == 12)
548 0 0 if ($mode == 13)
552 0 0 if ($mode == 7)
556 0 0 if ($IPV6_PROXYTYPE_POSITION[$dbtype] == 0) { }
562 0 0 if ($countryshort eq '-' or $proxytype eq '-') { }
565 0 0 if ($proxytype eq 'DCH' or $proxytype eq 'SES') { }
574 1 0 if ($ipno < $ipfrom) { }
581 0 0 if ($mode == 100) { }
584 0 0 if ($mode == 7) { }
598 0 3 if ($ipnum eq '')
599 0 0 if ($mode == 100) { }
602 0 0 if ($mode == 7) { }
610 0 3 if ($mode == 1 and $IPV4_COUNTRY_POSITION[$dbtype] == 0)
613 0 3 if ($mode == 2 and $IPV4_COUNTRY_POSITION[$dbtype] == 0)
616 0 3 if ($mode == 3 and $IPV4_REGION_POSITION[$dbtype] == 0)
619 0 3 if ($mode == 4 and $IPV4_CITY_POSITION[$dbtype] == 0)
622 0 3 if ($mode == 5 and $IPV4_ISP_POSITION[$dbtype] == 0)
625 0 3 if ($mode == 6 and $IPV4_PROXYTYPE_POSITION[$dbtype] == 0)
628 0 3 if ($mode == 8 and $IPV4_DOMAIN_POSITION[$dbtype] == 0)
631 0 3 if ($mode == 9 and $IPV4_USAGETYPE_POSITION[$dbtype] == 0)
634 0 3 if ($mode == 10 and $IPV4_ASN_POSITION[$dbtype] == 0)
637 0 3 if ($mode == 11 and $IPV4_AS_POSITION[$dbtype] == 0)
640 0 3 if ($mode == 12 and $IPV4_LASTSEEN_POSITION[$dbtype] == 0)
643 0 3 if ($mode == 13 and $IPV4_THREAT_POSITION[$dbtype] == 0)
659 3 0 if ($indexbaseaddr > 0)
668 0 3 if ($realipno == 4294967295) { }
678 3 12 if ($ipno >= $ipfrom and $ipno < $ipto) { }
684 0 3 if ($mode == 100)
699 0 0 if ($IPV4_COUNTRY_POSITION[$dbtype] != 0)
704 0 0 if ($IPV4_REGION_POSITION[$dbtype] != 0)
707 0 0 if ($IPV4_CITY_POSITION[$dbtype] != 0)
710 0 0 if ($IPV4_ISP_POSITION[$dbtype] != 0)
713 0 0 if ($IPV4_PROXYTYPE_POSITION[$dbtype] != 0)
716 0 0 if ($IPV4_DOMAIN_POSITION[$dbtype] != 0)
719 0 0 if ($IPV4_USAGETYPE_POSITION[$dbtype] != 0)
722 0 0 if ($IPV4_ASN_POSITION[$dbtype] != 0)
725 0 0 if ($IPV4_AS_POSITION[$dbtype] != 0)
728 0 0 if ($IPV4_LASTSEEN_POSITION[$dbtype] != 0)
731 0 0 if ($IPV4_THREAT_POSITION[$dbtype] != 0)
734 0 0 if ($countryshort eq '-') { }
737 0 0 if ($proxytype eq 'DCH' or $proxytype eq 'SES') { }
745 3 0 if ($mode == 1)
748 0 0 if ($mode == 2)
751 0 0 if ($mode == 3)
754 0 0 if ($mode == 4)
757 0 0 if ($mode == 5)
760 0 0 if ($mode == 6)
763 0 0 if ($mode == 8)
766 0 0 if ($mode == 9)
769 0 0 if ($mode == 10)
772 0 0 if ($mode == 11)
775 0 0 if ($mode == 12)
778 0 0 if ($mode == 13)
781 0 0 if ($mode == 7)
785 0 0 if ($IPV4_PROXYTYPE_POSITION[$dbtype] == 0) { }
791 0 0 if ($countryshort eq '-' or $proxytype eq '-') { }
794 0 0 if ($proxytype eq 'DCH' or $proxytype eq 'SES') { }
803 9 3 if ($ipno < $ipfrom) { }
810 0 0 if ($mode == 100) { }
813 0 0 if ($mode == 7) { }
862 0 0 if ($is_little_endian =~ /^1/) { }
874 0 8 if $#array != 15
898 3 3 if ($obj->isIPv4($ip)) { }
905 3 0 if ($obj->isIPv6($ip)) { }
911 0 3 if ($ipnum >= 281470681743360 and $ipnum <= 281474976710655)
916 0 3 if ($ipnum >= 4.2545680458834378e+37 and $ipnum <= 4.2550872755692912e+37)
924 0 3 if ($ipnum >= 4.2540488161975843e+37 and $ipnum <= 4.2540488241204e+37)
947 0 3 if ($ip[$#ip] =~ /^(\d+)\.(\d+)\.(\d+)\.(\d+)$/)
955 0 3 if ($#ip == 8)
965 24 0 unless $ip[$_] eq '000Z'
980 0 3 unless (length $hexip == 32)
988 20 364 if $_
1012 6 0 if ($host =~ /^$IPv4_re$/ or $host =~ /^$IPv6_re$/ or $host =~ /^\:\:$/) { }
1024 3 3 if ($ip =~ /^$IPv4_re$/) { }
1027 0 12 if $octet[$i] > 255 or $octet[$i] < 0
1038 3 0 if ($ip =~ /^$IPv6_re$/ or $ip =~ /^$IPv4_re$/) { }