blib/lib/Geo/IP2Location.pm

filter: Statementstmt 48.9% 510 / 1042 Branchbran 20.9% 92 / 440 Conditioncond 36.3% 61 / 168 MC/DCmcdc 3.6% 4 / 110 Subroutinesub 73.2% 82 / 112 Podpod 56.2% 27 / 48 totaltotal 40.4% 776 / 1920 SCAR 97.5
CC
281
Cov
40%
get_ipv6_record
3889.6
get_ipv4_record
3809.1
validate_ip
15.5
CRAP 17182.0
↑ Summary
1 #MIT License
2 #
3 #Copyright (c) 2022 IP2Location.com
4 #
5 #Permission is hereby granted, free of charge, to any person obtaining a copy
6 #of this software and associated documentation files (the "Software"), to deal
7 #in the Software without restriction, including without limitation the rights
8 #to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 #copies of the Software, and to permit persons to whom the Software is
10 #furnished to do so, subject to the following conditions:
11 #
12 #The above copyright notice and this permission notice shall be included in all
13 #copies or substantial portions of the Software.
14 #
15 #THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 #IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 #FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 #AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 #LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 #OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 #SOFTWARE.
22  
23 package Geo::IP2Location;
24  
25 3 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
26 3 ▶use vars qw(@ISA $VERSION @EXPORT);
Subroutine BEGIN: called CC=1 SCAR=0.0
27 3 ▶use Math::BigInt;
Subroutine BEGIN: called CC=1 SCAR=0.0
28 3 ▶use bigint;
Subroutine BEGIN: called CC=1 SCAR=0.0
29  
30 3 $VERSION = '8.60';
31 3 require Exporter;
32 3 @ISA = qw(Exporter);
33  
34 3 ▶use constant UNKNOWN => "UNKNOWN IP ADDRESS";
Subroutine BEGIN: called CC=1 SCAR=0.0
35 3 ▶use constant IPV6_ADDRESS_IN_IPV4_BIN => "IPV6 ADDRESS MISSING IN IPV4 BIN";
Subroutine BEGIN: called CC=1 SCAR=0.0
36 3 ▶use constant NO_IP => "MISSING IP ADDRESS";
Subroutine BEGIN: called CC=1 SCAR=0.0
37 3 ▶use constant INVALID_IPV6_ADDRESS => "INVALID IPV6 ADDRESS";
Subroutine BEGIN: called CC=1 SCAR=0.0
38 3 ▶use constant INVALID_IPV4_ADDRESS => "INVALID IPV4 ADDRESS";
Subroutine BEGIN: called CC=1 SCAR=0.0
39 3 ▶use constant INVALID_IP_ADDRESS => "INVALID IP ADDRESS";
Subroutine BEGIN: called CC=1 SCAR=0.0
40 3 ▶use constant INVALID_BIN_DATABASE => "Incorrect IP2Location BIN file format. Please make sure that you are using the latest IP2Location BIN file.";
Subroutine BEGIN: called CC=1 SCAR=0.0
41 3 ▶use constant NOT_SUPPORTED => "This parameter is unavailable in selected .BIN data file. Please upgrade data file.";
Subroutine BEGIN: called CC=1 SCAR=0.0
42 3 ▶use constant MAX_IPV4_RANGE => 4294967295;
Subroutine BEGIN: called CC=1 SCAR=0.0
43 3 ▶use constant MAX_IPV6_RANGE => 340282366920938463463374607431768211455;
Subroutine BEGIN: called CC=1 SCAR=0.0
44 3 ▶use constant IP_COUNTRY => 1;
Subroutine BEGIN: called CC=1 SCAR=0.0
45 3 ▶use constant IP_COUNTRY_ISP => 2;
Subroutine BEGIN: called CC=1 SCAR=0.0
46 3 ▶use constant IP_COUNTRY_REGION_CITY => 3;
Subroutine BEGIN: called CC=1 SCAR=0.0
47 3 ▶use constant IP_COUNTRY_REGION_CITY_ISP => 4;
Subroutine BEGIN: called CC=1 SCAR=0.0
48 3 ▶use constant IP_COUNTRY_REGION_CITY_LATITUDE_LONGITUDE => 5;
Subroutine BEGIN: called CC=1 SCAR=0.0
49 3 ▶use constant IP_COUNTRY_REGION_CITY_LATITUDE_LONGITUDE_ISP => 6;
Subroutine BEGIN: called CC=1 SCAR=0.0
50 3 ▶use constant IP_COUNTRY_REGION_CITY_ISP_DOMAIN => 7;
Subroutine BEGIN: called CC=1 SCAR=0.0
51 3 ▶use constant IP_COUNTRY_REGION_CITY_LATITUDE_LONGITUDE_ISP_DOMAIN => 8;
Subroutine BEGIN: called CC=1 SCAR=0.0
52 3 ▶use constant IP_COUNTRY_REGION_CITY_LATITUDE_LONGITUDE_ZIPCODE => 9;
Subroutine BEGIN: called CC=1 SCAR=0.0
53 3 ▶use constant IP_COUNTRY_REGION_CITY_LATITUDE_LONGITUDE_ZIPCODE_ISP_DOMAIN => 10;
Subroutine BEGIN: called CC=1 SCAR=0.0
54 3 ▶use constant IP_COUNTRY_REGION_CITY_LATITUDE_LONGITUDE_ZIPCODE_TIMEZONE => 11;
Subroutine BEGIN: called CC=1 SCAR=0.0
55 3 ▶use constant IP_COUNTRY_REGION_CITY_LATITUDE_LONGITUDE_ZIPCODE_TIMEZONE_ISP_DOMAIN => 12;
Subroutine BEGIN: called CC=1 SCAR=0.0
56 3 ▶use constant IP_COUNTRY_REGION_CITY_LATITUDE_LONGITUDE_TIMEZONE_NETSPEED => 13;
Subroutine BEGIN: called CC=1 SCAR=0.0
57 3 ▶use constant IP_COUNTRY_REGION_CITY_LATITUDE_LONGITUDE_ZIPCODE_TIMEZONE_ISP_DOMAIN_NETSPEED => 14;
Subroutine BEGIN: called CC=1 SCAR=0.0
58 3 ▶use constant IP_COUNTRY_REGION_CITY_LATITUDE_LONGITUDE_ZIPCODE_TIMEZONE_AREACODE => 15;
Subroutine BEGIN: called CC=1 SCAR=0.0
59 3 ▶use constant IP_COUNTRY_REGION_CITY_LATITUDE_LONGITUDE_ZIPCODE_TIMEZONE_ISP_DOMAIN_NETSPEED_AREACODE => 16;
Subroutine BEGIN: called CC=1 SCAR=0.0
60 3 ▶use constant IP_COUNTRY_REGION_CITY_LATITUDE_LONGITUDE_TIMEZONE_NETSPEED_WEATHER => 17;
Subroutine BEGIN: called CC=1 SCAR=0.0
61 3 ▶use constant IP_COUNTRY_REGION_CITY_LATITUDE_LONGITUDE_ZIPCODE_TIMEZONE_ISP_DOMAIN_NETSPEED_AREACODE_WEATHER => 18;
Subroutine BEGIN: called CC=1 SCAR=0.0
62 3 ▶use constant IP_COUNTRY_REGION_CITY_LATITUDE_LONGITUDE_ISP_DOMAIN_MOBILE => 19;
Subroutine BEGIN: called CC=1 SCAR=0.0
63 3 ▶use constant IP_COUNTRY_REGION_CITY_LATITUDE_LONGITUDE_ZIPCODE_TIMEZONE_ISP_DOMAIN_NETSPEED_AREACODE_WEATHER_MOBILE => 20;
Subroutine BEGIN: called CC=1 SCAR=0.0
64 3 ▶use constant IP_COUNTRY_REGION_CITY_LATITUDE_LONGITUDE_ZIPCODE_TIMEZONE_AREACODE_ELEVATION => 21;
Subroutine BEGIN: called CC=1 SCAR=0.0
65 3 ▶use constant IP_COUNTRY_REGION_CITY_LATITUDE_LONGITUDE_ZIPCODE_TIMEZONE_ISP_DOMAIN_NETSPEED_AREACODE_WEATHER_MOBILE_ELEVATION => 22;
Subroutine BEGIN: called CC=1 SCAR=0.0
66 3 ▶use constant IP_COUNTRY_REGION_CITY_LATITUDE_LONGITUDE_ISP_DOMAIN_MOBILE_USAGETYPE => 23;
Subroutine BEGIN: called CC=1 SCAR=0.0
67 3 ▶use constant IP_COUNTRY_REGION_CITY_LATITUDE_LONGITUDE_ZIPCODE_TIMEZONE_ISP_DOMAIN_NETSPEED_AREACODE_WEATHER_MOBILE_ELEVATION_USAGETYPE => 24;
Subroutine BEGIN: called CC=1 SCAR=0.0
68 3 ▶use constant IP_COUNTRY_REGION_CITY_LATITUDE_LONGITUDE_ZIPCODE_TIMEZONE_ISP_DOMAIN_NETSPEED_AREACODE_WEATHER_MOBILE_ELEVATION_USAGETYPE_ADDRESSTYPE_CATEGORY => 25;
Subroutine BEGIN: called CC=1 SCAR=0.0
69  
70 3 ▶use constant COUNTRYSHORT => 1;
Subroutine BEGIN: called CC=1 SCAR=0.0
71 3 ▶use constant COUNTRYLONG => 2;
Subroutine BEGIN: called CC=1 SCAR=0.0
72 3 ▶use constant REGION => 3;
Subroutine BEGIN: called CC=1 SCAR=0.0
73 3 ▶use constant CITY => 4;
Subroutine BEGIN: called CC=1 SCAR=0.0
74 3 ▶use constant ISP => 5;
Subroutine BEGIN: called CC=1 SCAR=0.0
75 3 ▶use constant LATITUDE => 6;
Subroutine BEGIN: called CC=1 SCAR=0.0
76 3 ▶use constant LONGITUDE => 7;
Subroutine BEGIN: called CC=1 SCAR=0.0
77 3 ▶use constant DOMAIN => 8;
Subroutine BEGIN: called CC=1 SCAR=0.0
78 3 ▶use constant ZIPCODE => 9;
Subroutine BEGIN: called CC=1 SCAR=0.0
79 3 ▶use constant TIMEZONE => 10;
Subroutine BEGIN: called CC=1 SCAR=0.0
80 3 ▶use constant NETSPEED => 11;
Subroutine BEGIN: called CC=1 SCAR=0.0
81 3 ▶use constant IDDCODE => 12;
Subroutine BEGIN: called CC=1 SCAR=0.0
82 3 ▶use constant AREACODE => 13;
Subroutine BEGIN: called CC=1 SCAR=0.0
83 3 ▶use constant WEATHERSTATIONCODE => 14;
Subroutine BEGIN: called CC=1 SCAR=0.0
84 3 ▶use constant WEATHERSTATIONNAME => 15;
Subroutine BEGIN: called CC=1 SCAR=0.0
85 3 ▶use constant MCC => 16;
Subroutine BEGIN: called CC=1 SCAR=0.0
86 3 ▶use constant MNC => 17;
Subroutine BEGIN: called CC=1 SCAR=0.0
87 3 ▶use constant MOBILEBRAND => 18;
Subroutine BEGIN: called CC=1 SCAR=0.0
88 3 ▶use constant ELEVATION => 19;
Subroutine BEGIN: called CC=1 SCAR=0.0
89 3 ▶use constant USAGETYPE => 20;
Subroutine BEGIN: called CC=1 SCAR=0.0
90 3 ▶use constant ADDRESSTYPE => 21;
Subroutine BEGIN: called CC=1 SCAR=0.0
91 3 ▶use constant CATEGORY => 22;
Subroutine BEGIN: called CC=1 SCAR=0.0
92  
93 3 ▶use constant ALL => 100;
Subroutine BEGIN: called CC=1 SCAR=0.0
94 3 ▶use constant IPV4 => 0;
Subroutine BEGIN: called CC=1 SCAR=0.0
95 3 ▶use constant IPV6 => 1;
Subroutine BEGIN: called CC=1 SCAR=0.0
96  
97 3 my @COUNTRY_POSITION = (0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2);
98 3 my @REGION_POSITION = (0, 0, 0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3);
99 3 my @CITY_POSITION = (0, 0, 0, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4);
100 3 my @LATITUDE_POSITION = (0, 0, 0, 0, 0, 5, 5, 0, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5);
101 3 my @LONGITUDE_POSITION = (0, 0, 0, 0, 0, 6, 6, 0, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6);
102 3 my @ZIPCODE_POSITION = (0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 7, 7, 7, 0, 7, 7, 7, 0, 7, 0, 7, 7, 7, 0, 7, 7);
103 3 my @TIMEZONE_POSITION = (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 8, 7, 8, 8, 8, 7, 8, 0, 8, 8, 8, 0, 8, 8);
104 3 my @ISP_POSITION = (0, 0, 3, 0, 5, 0, 7, 5, 7, 0, 8, 0, 9, 0, 9, 0, 9, 0, 9, 7, 9, 0, 9, 7, 9, 9);
105 3 my @DOMAIN_POSITION = (0, 0, 0, 0, 0, 0, 0, 6, 8, 0, 9, 0, 10, 0, 10, 0, 10, 0, 10, 8, 10, 0, 10, 8, 10, 10);
106 3 my @NETSPEED_POSITION = (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 11, 0, 11, 8, 11, 0, 11, 0, 11, 0, 11, 11);
107 3 my @IDDCODE_POSITION = (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 12, 0, 12, 0, 12, 9, 12, 0, 12, 12);
108 3 my @AREACODE_POSITION = (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 13, 0, 13, 0, 13, 10, 13, 0, 13, 13);
109 3 my @WEATHERSTATIONCODE_POSITION = (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 14, 0, 14, 0, 14, 0, 14, 14);
110 3 my @WEATHERSTATIONNAME_POSITION = (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 15, 0, 15, 0, 15, 0, 15, 15);
111 3 my @MCC_POSITION = (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 16, 0, 16, 9, 16, 16);
112 3 my @MNC_POSITION = (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 17, 0, 17, 10, 17, 17);
113 3 my @MOBILEBRAND_POSITION = (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 18, 0, 18, 11, 18, 18);
114 3 my @ELEVATION_POSITION = (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 19, 0, 19, 19);
115 3 my @USAGETYPE_POSITION = (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 20, 20);
116 3 my @ADDRESSTYPE_POSITION = (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 21);
117 3 my @CATEGORY_POSITION = (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 22);
118  
119 3 my @IPV6_COUNTRY_POSITION = (0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2);
120 3 my @IPV6_REGION_POSITION = (0, 0, 0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3);
121 3 my @IPV6_CITY_POSITION = (0, 0, 0, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4);
122 3 my @IPV6_LATITUDE_POSITION = (0, 0, 0, 0, 0, 5, 5, 0, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5);
123 3 my @IPV6_LONGITUDE_POSITION = (0, 0, 0, 0, 0, 6, 6, 0, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6);
124 3 my @IPV6_ZIPCODE_POSITION = (0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 7, 7, 7, 0, 7, 7, 7, 0, 7, 0, 7, 7, 7, 0, 7, 7);
125 3 my @IPV6_TIMEZONE_POSITION = (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 8, 7, 8, 8, 8, 7, 8, 0, 8, 8, 8, 0, 8, 8);
126 3 my @IPV6_ISP_POSITION = (0, 0, 3, 0, 5, 0, 7, 5, 7, 0, 8, 0, 9, 0, 9, 0, 9, 0, 9, 7, 9, 0, 9, 7, 9, 9);
127 3 my @IPV6_DOMAIN_POSITION = (0, 0, 0, 0, 0, 0, 0, 6, 8, 0, 9, 0, 10, 0, 10, 0, 10, 0, 10, 8, 10, 0, 10, 8, 10, 10);
128 3 my @IPV6_NETSPEED_POSITION = (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 11, 0, 11, 8, 11, 0, 11, 0, 11, 0, 11, 11);
129 3 my @IPV6_IDDCODE_POSITION = (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 12, 0, 12, 0, 12, 9, 12, 0, 12, 12);
130 3 my @IPV6_AREACODE_POSITION = (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 13, 0, 13, 0, 13, 10, 13, 0, 13, 13);
131 3 my @IPV6_WEATHERSTATIONCODE_POSITION = (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 14, 0, 14, 0, 14, 0, 14, 14);
132 3 my @IPV6_WEATHERSTATIONNAME_POSITION = (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 15, 0, 15, 0, 15, 0, 15, 15);
133 3 my @IPV6_MCC_POSITION = (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 16, 0, 16, 9, 16, 16);
134 3 my @IPV6_MNC_POSITION = (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 17, 0, 17, 10, 17, 17);
135 3 my @IPV6_MOBILEBRAND_POSITION = (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 18, 0, 18, 11, 18, 18);
136 3 my @IPV6_ELEVATION_POSITION = (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 19, 0, 19, 19);
137 3 my @IPV6_USAGETYPE_POSITION = (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 20, 20);
138 3 my @IPV6_ADDRESSTYPE_POSITION = (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 21);
139 3 my @IPV6_CATEGORY_POSITION = (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 22);
140  
141  
142 3 my $IPv6_re = qr/:(?::[0-9a-fA-F]{1,4}){0,5}(?:(?::[0-9a-fA-F]{1,4}){1,2}|:(?:(?:25[0-5]|2[0-4][0-9]|[0-1]?[0-9]{1,2})[.](?:25[0-5]|2[0-4][0-9]|[0-1]?[0-9]{1,2})[.](?:25[0-5]|2[0-4][0-9]|[0-1]?[0-9]{1,2})[.](?:25[0-5]|2[0-4][0-9]|[0-1]?[0-9]{1,2})))|[0-9a-fA-F]{1,4}:(?:[0-9a-fA-F]{1,4}:(?:[0-9a-fA-F]{1,4}:(?:[0-9a-fA-F]{1,4}:(?:[0-9a-fA-F]{1,4}:(?:[0-9a-fA-F]{1,4}:(?:[0-9a-fA-F]{1,4}:(?:[0-9a-fA-F]{1,4}|:)|(?::(?:[0-9a-fA-F]{1,4})?|(?:(?:25[0-5]|2[0-4][0-9]|[0-1]?[0-9]{1,2})[.](?:25[0-5]|2[0-4][0-9]|[0-1]?[0-9]{1,2})[.](?:25[0-5]|2[0-4][0-9]|[0-1]?[0-9]{1,2})[.](?:25[0-5]|2[0-4][0-9]|[0-1]?[0-9]{1,2}))))|:(?:(?:(?:25[0-5]|2[0-4][0-9]|[0-1]?[0-9]{1,2})[.](?:25[0-5]|2[0-4][0-9]|[0-1]?[0-9]{1,2})[.](?:25[0-5]|2[0-4][0-9]|[0-1]?[0-9]{1,2})[.](?:25[0-5]|2[0-4][0-9]|[0-1]?[0-9]{1,2}))|[0-9a-fA-F]{1,4}(?::[0-9a-fA-F]{1,4})?|))|(?::(?:(?:25[0-5]|2[0-4][0-9]|[0-1]?[0-9]{1,2})[.](?:25[0-5]|2[0-4][0-9]|[0-1]?[0-9]{1,2})[.](?:25[0-5]|2[0-4][0-9]|[0-1]?[0-9]{1,2})[.](?:25[0-5]|2[0-4][0-9]|[0-1]?[0-9]{1,2}))|:[0-9a-fA-F]{1,4}(?::(?:(?:25[0-5]|2[0-4][0-9]|[0-1]?[0-9]{1,2})[.](?:25[0-5]|2[0-4][0-9]|[0-1]?[0-9]{1,2})[.](?:25[0-5]|2[0-4][0-9]|[0-1]?[0-9]{1,2})[.](?:25[0-5]|2[0-4][0-9]|[0-1]?[0-9]{1,2}))|(?::[0-9a-fA-F]{1,4}){0,2})|:))|(?:(?::[0-9a-fA-F]{1,4}){0,2}(?::(?:(?:25[0-5]|2[0-4][0-9]|[0-1]?[0-9]{1,2})[.](?:25[0-5]|2[0-4][0-9]|[0-1]?[0-9]{1,2})[.](?:25[0-5]|2[0-4][0-9]|[0-1]?[0-9]{1,2})[.](?:25[0-5]|2[0-4][0-9]|[0-1]?[0-9]{1,2}))|(?::[0-9a-fA-F]{1,4}){1,2})|:))|(?:(?::[0-9a-fA-F]{1,4}){0,3}(?::(?:(?:25[0-5]|2[0-4][0-9]|[0-1]?[0-9]{1,2})[.](?:25[0-5]|2[0-4][0-9]|[0-1]?[0-9]{1,2})[.](?:25[0-5]|2[0-4][0-9]|[0-1]?[0-9]{1,2})[.](?:25[0-5]|2[0-4][0-9]|[0-1]?[0-9]{1,2}))|(?::[0-9a-fA-F]{1,4}){1,2})|:))|(?:(?::[0-9a-fA-F]{1,4}){0,4}(?::(?:(?:25[0-5]|2[0-4][0-9]|[0-1]?[0-9]{1,2})[.](?:25[0-5]|2[0-4][0-9]|[0-1]?[0-9]{1,2})[.](?:25[0-5]|2[0-4][0-9]|[0-1]?[0-9]{1,2})[.](?:25[0-5]|2[0-4][0-9]|[0-1]?[0-9]{1,2}))|(?::[0-9a-fA-F]{1,4}){1,2})|:))/;
143 3 my $IPv4_re = qr/\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}/;
144  
145 3 my $getLastErrorMessage = "";
146  
147 sub open {
148 2 ▶ unless( (@_ > 1) && ($_[1]) ) {
Subroutine open: called CC=7 SCAR=25.7
Pod documented
Branch: 1 branch
BranchTrueFalseTotal
unless (@_ > bless( {"sign" => "+","value" => bless( [1], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $_[1]) 0 2 2
Condition33%1/3
@_ > bless( {"sign" => "+","value" => bless( [1], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $_[1]
!ll&&!rl&&r
002
MC/DC0%0/2
@_ > bless( {"sign" => "+","value" => bless( [1], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $_[1]
@_ > bless( {"sign" => "+","value" => bless( [1], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) $_[1]
Truth table33%1/3
A and B
A= @_ > bless( {"sign" => "+","value" => bless( [1], 'Math::BigInt::Calc' )}, 'Math::BigInt' )B= $_[1]
ABresult
0X0
100
111
149 0 $getLastErrorMessage = "Geo::IP2Location::open() requires a database path name.";
150 0 die "Geo::IP2Location::open() requires a database path name";
151 }
152 2 my ($class, $db_file) = @_;
153 2 my $handle;
154 my $obj;
155 2 ▶ unless (CORE::open $handle, "$db_file") {
Branch: 1 branch
BranchTrueFalseTotal
unless (CORE::open $handle, "$db_file") 0 2 2
156 0 $getLastErrorMessage = "Geo::IP2Location::open() error in opening $db_file" . ".";
157 0 die "Geo::IP2Location::open() error in opening $db_file";
158 }
159 2 binmode($handle);
160 2 $obj = bless {filehandle => $handle}, $class;
161 2 $obj->initialize();
162 2 ▶ if ($obj->{"productcode"} == 1) {
Branch: 1 branch
BranchTrueFalseTotal
if ($obj->{'productcode'} == {sign => '+', value => ['1']}) { } 0 2 2
163 } else {
164 2 ▶ if (($obj->{"databaseyear"} <= 20) && ($obj->{"productcode"} == 0)) {
Branch: 1 branch
BranchTrueFalseTotal
if ($obj->{'databaseyear'} <= {sign => '+', value => ['20']} and $obj->{'productcode'} == {sign => '+', value => ['0']}) { } 2 0 2
Condition33%1/3
$obj->{"databaseyear"} <= bless( {"sign" => "+","value" => bless( [20], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $obj->{"productcode"} == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
!ll&&!rl&&r
002
MC/DC0%0/2
$obj->{"databaseyear"} <= bless( {"sign" => "+","value" => bless( [20], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $obj->{"productcode"} == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
$obj->{"databaseyear"} <= bless( {"sign" => "+","value" => bless( [20], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) $obj->{"productcode"} == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
Truth table33%1/3
A and B
A= $obj->{"databaseyear"} <= bless( {"sign" => "+","value" => bless( [20], 'Math::BigInt::Calc' )}, 'Math::BigInt' )B= $obj->{"productcode"} == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
ABresult
0X0
100
111
165 } else {
166 0 $obj->close();
167 0 undef $obj;
168 0 $getLastErrorMessage = INVALID_BIN_DATABASE;
169 0 die INVALID_BIN_DATABASE;
170 }
171 }
172 2 return $obj;
173 }
174  
175 sub close {
176 0 ▶ my ($class) = @_;
Subroutine close: not called CC=2 SCAR=17.9
Pod undocumented
177 0 ▶ if (CORE::close($class->{filehandle})) {
Branch: 1 branch
BranchTrueFalseTotal
if (CORE::close $class->{'filehandle'}) { } 0 0 0
178 0 return 0;
179 } else {
180 0 return 1;
181 }
182 }
183  
184 sub initialize {
185 2 ▶ my ($obj) = @_;
Subroutine initialize: called CC=1 SCAR=0.0
Pod undocumented
186 2 my @header = $obj->read512($obj->{filehandle}, 1);
187 2 $obj->{"databasetype"} = unpack("C", $header[0]);
188 2 $obj->{"databasecolumn"} = unpack("C", $header[1]);
189 2 $obj->{"databaseyear"} = unpack("C", $header[2]);
190 2 $obj->{"databasemonth"} = unpack("C", $header[3]);
191 2 $obj->{"databaseday"} = unpack("C", $header[4]);
192 2 $obj->{"ipv4databasecount"} = unpack("V", join('', @header[5..8]));
193 2 $obj->{"ipv4databaseaddr"} = unpack("V", join('', @header[9..12]));
194 2 $obj->{"ipv6databasecount"} = unpack("V", join('', @header[13..16]));
195 2 $obj->{"ipv6databaseaddr"} = unpack("V", join('', @header[17..20]));
196 2 $obj->{"ipv4indexbaseaddr"} = unpack("V", join('', @header[21..24]));
197 2 $obj->{"ipv6indexbaseaddr"} = unpack("V", join('', @header[25..28]));
198 2 $obj->{"productcode"} = unpack("C", $header[29]);
199 2 $obj->{"licensecode"} = unpack("C", $header[30]);
200 2 $obj->{"databasesize"} = unpack("V", join('', @header[31..34]));
201 2 return $obj;
202 }
203  
204 sub get_last_error_message {
205 0 ▶ my $class = shift(@_);
Subroutine get_last_error_message: not called CC=1 SCAR=6.9
Pod documented
206 0 return ($getLastErrorMessage);
207 }
208  
209 sub get_module_version {
210 0 ▶ my $obj = shift(@_);
Subroutine get_module_version: not called CC=1 SCAR=6.9
Pod documented
211 0 return $VERSION;
212 }
213  
214 sub get_database_version {
215 0 ▶ my $obj = shift(@_);
Subroutine get_database_version: not called CC=1 SCAR=6.9
Pod documented
216 0 return $obj->{"databaseyear"} . "." . $obj->{"databasemonth"} . "." . $obj->{"databaseday"};
217 }
218  
219 sub get_country_short {
220 20 ▶ my $obj = shift(@_);
Subroutine get_country_short: called CC=3 SCAR=11.1
Pod documented
221 20 my $ipaddr = shift(@_);
222 20 my ($ipv, $ipnum) = $obj->validate_ip($ipaddr);
223 20 ▶ if ($ipv == 4) {
Branch: 1 branch
BranchTrueFalseTotal
if ($ipv == {sign => '+', value => ['4']}) { } 10 10 20
224 10 return $obj->get_ipv4_record($ipnum, COUNTRYSHORT);
225 } else {
226 10 ▶ if ($ipv == 6) {
Branch: 1 branch
BranchTrueFalseTotal
if ($ipv == {sign => '+', value => ['6']}) { } 10 0 10
227 10 return $obj->get_ipv6_record($ipnum, COUNTRYSHORT);
228 } else {
229 0 return INVALID_IP_ADDRESS;
230 }
231 }
232 }
233  
234 sub get_country_long {
235 0 ▶ my $obj = shift(@_);
Subroutine get_country_long: not called CC=3 SCAR=24.8
Pod documented
236 0 my $ipaddr = shift(@_);
237 0 my ($ipv, $ipnum) = $obj->validate_ip($ipaddr);
238 0 ▶ if ($ipv == 4) {
Branch: 1 branch
BranchTrueFalseTotal
if ($ipv == {sign => '+', value => ['4']}) { } 0 0 0
239 0 return $obj->get_ipv4_record($ipnum, COUNTRYLONG);
240 } else {
241 0 ▶ if ($ipv == 6) {
Branch: 1 branch
BranchTrueFalseTotal
if ($ipv == {sign => '+', value => ['6']}) { } 0 0 0
242 0 return $obj->get_ipv6_record($ipnum, COUNTRYLONG);
243 } else {
244 0 return INVALID_IP_ADDRESS;
245 }
246 }
247 }
248  
249 sub get_region {
250 0 ▶ my $obj = shift(@_);
Subroutine get_region: not called CC=3 SCAR=24.8
Pod documented
251 0 my $ipaddr = shift(@_);
252 0 my ($ipv, $ipnum) = $obj->validate_ip($ipaddr);
253 0 ▶ if ($ipv == 4) {
Branch: 1 branch
BranchTrueFalseTotal
if ($ipv == {sign => '+', value => ['4']}) { } 0 0 0
254 0 return $obj->get_ipv4_record($ipnum, REGION);
255 } else {
256 0 ▶ if ($ipv == 6) {
Branch: 1 branch
BranchTrueFalseTotal
if ($ipv == {sign => '+', value => ['6']}) { } 0 0 0
257 0 return $obj->get_ipv6_record($ipnum, REGION);
258 } else {
259 0 return INVALID_IP_ADDRESS;
260 }
261 }
262 }
263  
264 sub get_city {
265 0 ▶ my $obj = shift(@_);
Subroutine get_city: not called CC=3 SCAR=24.8
Pod documented
266 0 my $ipaddr = shift(@_);
267 0 my ($ipv, $ipnum) = $obj->validate_ip($ipaddr);
268 0 ▶ if ($ipv == 4) {
Branch: 1 branch
BranchTrueFalseTotal
if ($ipv == {sign => '+', value => ['4']}) { } 0 0 0
269 0 return $obj->get_ipv4_record($ipnum, CITY);
270 } else {
271 0 ▶ if ($ipv == 6) {
Branch: 1 branch
BranchTrueFalseTotal
if ($ipv == {sign => '+', value => ['6']}) { } 0 0 0
272 0 return $obj->get_ipv6_record($ipnum, CITY);
273 } else {
274 0 return INVALID_IP_ADDRESS;
275 }
276 }
277 }
278  
279 sub get_isp {
280 0 ▶ my $obj = shift(@_);
Subroutine get_isp: not called CC=3 SCAR=24.8
Pod documented
281 0 my $ipaddr = shift(@_);
282 0 my ($ipv, $ipnum) = $obj->validate_ip($ipaddr);
283 0 ▶ if ($ipv == 4) {
Branch: 1 branch
BranchTrueFalseTotal
if ($ipv == {sign => '+', value => ['4']}) { } 0 0 0
284 0 return $obj->get_ipv4_record($ipnum, ISP);
285 } else {
286 0 ▶ if ($ipv == 6) {
Branch: 1 branch
BranchTrueFalseTotal
if ($ipv == {sign => '+', value => ['6']}) { } 0 0 0
287 0 return $obj->get_ipv6_record($ipnum, ISP);
288 } else {
289 0 return INVALID_IP_ADDRESS;
290 }
291 }
292 }
293  
294 sub get_latitude {
295 0 ▶ my $obj = shift(@_);
Subroutine get_latitude: not called CC=3 SCAR=24.8
Pod documented
296 0 my $ipaddr = shift(@_);
297 0 my ($ipv, $ipnum) = $obj->validate_ip($ipaddr);
298 0 ▶ if ($ipv == 4) {
Branch: 1 branch
BranchTrueFalseTotal
if ($ipv == {sign => '+', value => ['4']}) { } 0 0 0
299 0 return $obj->get_ipv4_record($ipnum, LATITUDE);
300 } else {
301 0 ▶ if ($ipv == 6) {
Branch: 1 branch
BranchTrueFalseTotal
if ($ipv == {sign => '+', value => ['6']}) { } 0 0 0
302 0 return $obj->get_ipv6_record($ipnum, LATITUDE);
303 } else {
304 0 return INVALID_IP_ADDRESS;
305 }
306 }
307 }
308  
309 sub get_zipcode {
310 0 ▶ my $obj = shift(@_);
Subroutine get_zipcode: not called CC=3 SCAR=24.8
Pod documented
311 0 my $ipaddr = shift(@_);
312 0 my ($ipv, $ipnum) = $obj->validate_ip($ipaddr);
313 0 ▶ if ($ipv == 4) {
Branch: 1 branch
BranchTrueFalseTotal
if ($ipv == {sign => '+', value => ['4']}) { } 0 0 0
314 0 return $obj->get_ipv4_record($ipnum, ZIPCODE);
315 } else {
316 0 ▶ if ($ipv == 6) {
Branch: 1 branch
BranchTrueFalseTotal
if ($ipv == {sign => '+', value => ['6']}) { } 0 0 0
317 0 return $obj->get_ipv6_record($ipnum, ZIPCODE);
318 } else {
319 0 return INVALID_IP_ADDRESS;
320 }
321 }
322 }
323  
324 sub get_longitude {
325 0 ▶ my $obj = shift(@_);
Subroutine get_longitude: not called CC=3 SCAR=24.8
Pod documented
326 0 my $ipaddr = shift(@_);
327 0 my ($ipv, $ipnum) = $obj->validate_ip($ipaddr);
328 0 ▶ if ($ipv == 4) {
Branch: 1 branch
BranchTrueFalseTotal
if ($ipv == {sign => '+', value => ['4']}) { } 0 0 0
329 0 return $obj->get_ipv4_record($ipnum, LONGITUDE);
330 } else {
331 0 ▶ if ($ipv == 6) {
Branch: 1 branch
BranchTrueFalseTotal
if ($ipv == {sign => '+', value => ['6']}) { } 0 0 0
332 0 return $obj->get_ipv6_record($ipnum, LONGITUDE);
333 } else {
334 0 return INVALID_IP_ADDRESS;
335 }
336 }
337 }
338  
339 sub get_domain {
340 0 ▶ my $obj = shift(@_);
Subroutine get_domain: not called CC=3 SCAR=24.8
Pod documented
341 0 my $ipaddr = shift(@_);
342 0 my ($ipv, $ipnum) = $obj->validate_ip($ipaddr);
343 0 ▶ if ($ipv == 4) {
Branch: 1 branch
BranchTrueFalseTotal
if ($ipv == {sign => '+', value => ['4']}) { } 0 0 0
344 0 return $obj->get_ipv4_record($ipnum, DOMAIN);
345 } else {
346 0 ▶ if ($ipv == 6) {
Branch: 1 branch
BranchTrueFalseTotal
if ($ipv == {sign => '+', value => ['6']}) { } 0 0 0
347 0 return $obj->get_ipv6_record($ipnum, DOMAIN);
348 } else {
349 0 return INVALID_IP_ADDRESS;
350 }
351 }
352 }
353  
354 sub get_timezone {
355 0 ▶ my $obj = shift(@_);
Subroutine get_timezone: not called CC=3 SCAR=24.8
Pod documented
356 0 my $ipaddr = shift(@_);
357 0 my ($ipv, $ipnum) = $obj->validate_ip($ipaddr);
358 0 ▶ if ($ipv == 4) {
Branch: 1 branch
BranchTrueFalseTotal
if ($ipv == {sign => '+', value => ['4']}) { } 0 0 0
359 0 return $obj->get_ipv4_record($ipnum, TIMEZONE);
360 } else {
361 0 ▶ if ($ipv == 6) {
Branch: 1 branch
BranchTrueFalseTotal
if ($ipv == {sign => '+', value => ['6']}) { } 0 0 0
362 0 return $obj->get_ipv6_record($ipnum, TIMEZONE);
363 } else {
364 0 return INVALID_IP_ADDRESS;
365 }
366 }
367 }
368  
369 sub get_netspeed {
370 0 ▶ my $obj = shift(@_);
Subroutine get_netspeed: not called CC=3 SCAR=24.8
Pod documented
371 0 my $ipaddr = shift(@_);
372 0 my ($ipv, $ipnum) = $obj->validate_ip($ipaddr);
373 0 ▶ if ($ipv == 4) {
Branch: 1 branch
BranchTrueFalseTotal
if ($ipv == {sign => '+', value => ['4']}) { } 0 0 0
374 0 return $obj->get_ipv4_record($ipnum, NETSPEED);
375 } else {
376 0 ▶ if ($ipv == 6) {
Branch: 1 branch
BranchTrueFalseTotal
if ($ipv == {sign => '+', value => ['6']}) { } 0 0 0
377 0 return $obj->get_ipv6_record($ipnum, NETSPEED);
378 } else {
379 0 return INVALID_IP_ADDRESS;
380 }
381 }
382 }
383  
384 sub get_iddcode {
385 0 ▶ my $obj = shift(@_);
Subroutine get_iddcode: not called CC=3 SCAR=24.8
Pod documented
386 0 my $ipaddr = shift(@_);
387 0 my ($ipv, $ipnum) = $obj->validate_ip($ipaddr);
388 0 ▶ if ($ipv == 4) {
Branch: 1 branch
BranchTrueFalseTotal
if ($ipv == {sign => '+', value => ['4']}) { } 0 0 0
389 0 return $obj->get_ipv4_record($ipnum, IDDCODE);
390 } else {
391 0 ▶ if ($ipv == 6) {
Branch: 1 branch
BranchTrueFalseTotal
if ($ipv == {sign => '+', value => ['6']}) { } 0 0 0
392 0 return $obj->get_ipv6_record($ipnum, IDDCODE);
393 } else {
394 0 return INVALID_IP_ADDRESS;
395 }
396 }
397 }
398  
399 sub get_areacode {
400 0 ▶ my $obj = shift(@_);
Subroutine get_areacode: not called CC=3 SCAR=24.8
Pod documented
401 0 my $ipaddr = shift(@_);
402 0 my ($ipv, $ipnum) = $obj->validate_ip($ipaddr);
403 0 ▶ if ($ipv == 4) {
Branch: 1 branch
BranchTrueFalseTotal
if ($ipv == {sign => '+', value => ['4']}) { } 0 0 0
404 0 return $obj->get_ipv4_record($ipnum, AREACODE);
405 } else {
406 0 ▶ if ($ipv == 6) {
Branch: 1 branch
BranchTrueFalseTotal
if ($ipv == {sign => '+', value => ['6']}) { } 0 0 0
407 0 return $obj->get_ipv6_record($ipnum, AREACODE);
408 } else {
409 0 return INVALID_IP_ADDRESS;
410 }
411 }
412 }
413  
414 sub get_weatherstationcode {
415 0 ▶ my $obj = shift(@_);
Subroutine get_weatherstationcode: not called CC=3 SCAR=24.8
Pod documented
416 0 my $ipaddr = shift(@_);
417 0 my ($ipv, $ipnum) = $obj->validate_ip($ipaddr);
418 0 ▶ if ($ipv == 4) {
Branch: 1 branch
BranchTrueFalseTotal
if ($ipv == {sign => '+', value => ['4']}) { } 0 0 0
419 0 return $obj->get_ipv4_record($ipnum, WEATHERSTATIONCODE);
420 } else {
421 0 ▶ if ($ipv == 6) {
Branch: 1 branch
BranchTrueFalseTotal
if ($ipv == {sign => '+', value => ['6']}) { } 0 0 0
422 0 return $obj->get_ipv6_record($ipnum, WEATHERSTATIONCODE);
423 } else {
424 0 return INVALID_IP_ADDRESS;
425 }
426 }
427 }
428  
429 sub get_weatherstationname {
430 0 ▶ my $obj = shift(@_);
Subroutine get_weatherstationname: not called CC=3 SCAR=24.8
Pod documented
431 0 my $ipaddr = shift(@_);
432 0 my ($ipv, $ipnum) = $obj->validate_ip($ipaddr);
433 0 ▶ if ($ipv == 4) {
Branch: 1 branch
BranchTrueFalseTotal
if ($ipv == {sign => '+', value => ['4']}) { } 0 0 0
434 0 return $obj->get_ipv4_record($ipnum, WEATHERSTATIONNAME);
435 } else {
436 0 ▶ if ($ipv == 6) {
Branch: 1 branch
BranchTrueFalseTotal
if ($ipv == {sign => '+', value => ['6']}) { } 0 0 0
437 0 return $obj->get_ipv6_record($ipnum, WEATHERSTATIONNAME);
438 } else {
439 0 return INVALID_IP_ADDRESS;
440 }
441 }
442 }
443  
444 sub get_mcc {
445 0 ▶ my $obj = shift(@_);
Subroutine get_mcc: not called CC=3 SCAR=24.8
Pod documented
446 0 my $ipaddr = shift(@_);
447 0 my ($ipv, $ipnum) = $obj->validate_ip($ipaddr);
448 0 ▶ if ($ipv == 4) {
Branch: 1 branch
BranchTrueFalseTotal
if ($ipv == {sign => '+', value => ['4']}) { } 0 0 0
449 0 return $obj->get_ipv4_record($ipnum, MCC);
450 } else {
451 0 ▶ if ($ipv == 6) {
Branch: 1 branch
BranchTrueFalseTotal
if ($ipv == {sign => '+', value => ['6']}) { } 0 0 0
452 0 return $obj->get_ipv6_record($ipnum, MCC);
453 } else {
454 0 return INVALID_IP_ADDRESS;
455 }
456 }
457 }
458  
459 sub get_mnc {
460 0 ▶ my $obj = shift(@_);
Subroutine get_mnc: not called CC=3 SCAR=24.8
Pod documented
461 0 my $ipaddr = shift(@_);
462 0 my ($ipv, $ipnum) = $obj->validate_ip($ipaddr);
463 0 ▶ if ($ipv == 4) {
Branch: 1 branch
BranchTrueFalseTotal
if ($ipv == {sign => '+', value => ['4']}) { } 0 0 0
464 0 return $obj->get_ipv4_record($ipnum, MNC);
465 } else {
466 0 ▶ if ($ipv == 6) {
Branch: 1 branch
BranchTrueFalseTotal
if ($ipv == {sign => '+', value => ['6']}) { } 0 0 0
467 0 return $obj->get_ipv6_record($ipnum, MNC);
468 } else {
469 0 return INVALID_IP_ADDRESS;
470 }
471 }
472 }
473  
474 sub get_mobilebrand {
475 0 ▶ my $obj = shift(@_);
Subroutine get_mobilebrand: not called CC=3 SCAR=24.8
Pod documented
476 0 my $ipaddr = shift(@_);
477 0 my ($ipv, $ipnum) = $obj->validate_ip($ipaddr);
478 0 ▶ if ($ipv == 4) {
Branch: 1 branch
BranchTrueFalseTotal
if ($ipv == {sign => '+', value => ['4']}) { } 0 0 0
479 0 return $obj->get_ipv4_record($ipnum, MOBILEBRAND);
480 } else {
481 0 ▶ if ($ipv == 6) {
Branch: 1 branch
BranchTrueFalseTotal
if ($ipv == {sign => '+', value => ['6']}) { } 0 0 0
482 0 return $obj->get_ipv6_record($ipnum, MOBILEBRAND);
483 } else {
484 0 return INVALID_IP_ADDRESS;
485 }
486 }
487 }
488  
489 sub get_elevation {
490 0 ▶ my $obj = shift(@_);
Subroutine get_elevation: not called CC=3 SCAR=24.8
Pod documented
491 0 my $ipaddr = shift(@_);
492 0 my ($ipv, $ipnum) = $obj->validate_ip($ipaddr);
493 0 ▶ if ($ipv == 4) {
Branch: 1 branch
BranchTrueFalseTotal
if ($ipv == {sign => '+', value => ['4']}) { } 0 0 0
494 0 return $obj->get_ipv4_record($ipnum, ELEVATION);
495 } else {
496 0 ▶ if ($ipv == 6) {
Branch: 1 branch
BranchTrueFalseTotal
if ($ipv == {sign => '+', value => ['6']}) { } 0 0 0
497 0 return $obj->get_ipv6_record($ipnum, ELEVATION);
498 } else {
499 0 return INVALID_IP_ADDRESS;
500 }
501 }
502 }
503  
504 sub get_usagetype {
505 0 ▶ my $obj = shift(@_);
Subroutine get_usagetype: not called CC=3 SCAR=24.8
Pod documented
506 0 my $ipaddr = shift(@_);
507 0 my ($ipv, $ipnum) = $obj->validate_ip($ipaddr);
508 0 ▶ if ($ipv == 4) {
Branch: 1 branch
BranchTrueFalseTotal
if ($ipv == {sign => '+', value => ['4']}) { } 0 0 0
509 0 return $obj->get_ipv4_record($ipnum, USAGETYPE);
510 } else {
511 0 ▶ if ($ipv == 6) {
Branch: 1 branch
BranchTrueFalseTotal
if ($ipv == {sign => '+', value => ['6']}) { } 0 0 0
512 0 return $obj->get_ipv6_record($ipnum, USAGETYPE);
513 } else {
514 0 return INVALID_IP_ADDRESS;
515 }
516 }
517 }
518  
519 sub get_addresstype {
520 0 ▶ my $obj = shift(@_);
Subroutine get_addresstype: not called CC=3 SCAR=24.8
Pod documented
521 0 my $ipaddr = shift(@_);
522 0 my ($ipv, $ipnum) = $obj->validate_ip($ipaddr);
523 0 ▶ if ($ipv == 4) {
Branch: 1 branch
BranchTrueFalseTotal
if ($ipv == {sign => '+', value => ['4']}) { } 0 0 0
524 0 return $obj->get_ipv4_record($ipnum, ADDRESSTYPE);
525 } else {
526 0 ▶ if ($ipv == 6) {
Branch: 1 branch
BranchTrueFalseTotal
if ($ipv == {sign => '+', value => ['6']}) { } 0 0 0
527 0 return $obj->get_ipv6_record($ipnum, ADDRESSTYPE);
528 } else {
529 0 return INVALID_IP_ADDRESS;
530 }
531 }
532 }
533  
534 sub get_category {
535 0 ▶ my $obj = shift(@_);
Subroutine get_category: not called CC=3 SCAR=24.8
Pod documented
536 0 my $ipaddr = shift(@_);
537 0 my ($ipv, $ipnum) = $obj->validate_ip($ipaddr);
538 0 ▶ if ($ipv == 4) {
Branch: 1 branch
BranchTrueFalseTotal
if ($ipv == {sign => '+', value => ['4']}) { } 0 0 0
539 0 return $obj->get_ipv4_record($ipnum, CATEGORY);
540 } else {
541 0 ▶ if ($ipv == 6) {
Branch: 1 branch
BranchTrueFalseTotal
if ($ipv == {sign => '+', value => ['6']}) { } 0 0 0
542 0 return $obj->get_ipv6_record($ipnum, CATEGORY);
543 } else {
544 0 return INVALID_IP_ADDRESS;
545 }
546 }
547 }
548  
549 sub get_all {
550 0 ▶ my $obj = shift(@_);
Subroutine get_all: not called CC=3 SCAR=24.8
Pod documented
551 0 my $ipaddr = shift(@_);
552 0 my ($ipv, $ipnum) = $obj->validate_ip($ipaddr);
553 0 ▶ if ($ipv == 4) {
Branch: 1 branch
BranchTrueFalseTotal
if ($ipv == {sign => '+', value => ['4']}) { } 0 0 0
554 0 return $obj->get_ipv4_record($ipnum, ALL);
555 } else {
556 0 ▶ if ($ipv == 6) {
Branch: 1 branch
BranchTrueFalseTotal
if ($ipv == {sign => '+', value => ['6']}) { } 0 0 0
557 0 return $obj->get_ipv6_record($ipnum, ALL);
558 } else {
559 0 return (INVALID_IP_ADDRESS, INVALID_IP_ADDRESS, INVALID_IP_ADDRESS, INVALID_IP_ADDRESS, INVALID_IP_ADDRESS, INVALID_IP_ADDRESS, INVALID_IP_ADDRESS, INVALID_IP_ADDRESS, INVALID_IP_ADDRESS, INVALID_IP_ADDRESS, INVALID_IP_ADDRESS, INVALID_IP_ADDRESS, INVALID_IP_ADDRESS, INVALID_IP_ADDRESS, INVALID_IP_ADDRESS, INVALID_IP_ADDRESS, INVALID_IP_ADDRESS, INVALID_IP_ADDRESS, INVALID_IP_ADDRESS, INVALID_IP_ADDRESS, INVALID_IP_ADDRESS, INVALID_IP_ADDRESS);
560 }
561 }
562 }
563  
564 sub get_ipv6_record {
565 10 ▶ my $obj = shift(@_);
Subroutine get_ipv6_record: called CC=100 SCAR=82.7
Pod undocumented
566 10 my $ipnum = shift(@_);
567 10 my $mode = shift(@_);
568 10 my $dbtype = $obj->{"databasetype"};
569  
570 10 ▶ if ($ipnum eq "") {
Branch: 1 branch
BranchTrueFalseTotal
if ($ipnum eq "") 0 10 10
571 0 ▶ if ($mode == ALL) {
Branch: 1 branch
BranchTrueFalseTotal
if ($mode == {sign => '+', value => ['100']}) { } 0 0 0
572 0 return (NO_IP, NO_IP, NO_IP, NO_IP, NO_IP, NO_IP, NO_IP, NO_IP, NO_IP, NO_IP, NO_IP, NO_IP, NO_IP, NO_IP, NO_IP, NO_IP, NO_IP, NO_IP, NO_IP, NO_IP, NO_IP, NO_IP);
573 } else {
574 0 return NO_IP;
575 }
576 }
577  
578 10 ▶ if (($mode == COUNTRYSHORT) && ($IPV6_COUNTRY_POSITION[$dbtype] == 0)) {
Branch: 1 branch
BranchTrueFalseTotal
if ($mode == bless( {"sign" => "+","value" => bless( [1], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $IPV6_COUNTRY_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )) 0 10 10
Condition33%1/3
$mode == bless( {"sign" => "+","value" => bless( [1], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $IPV6_COUNTRY_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
!ll&&!rl&&r
0100
MC/DC0%0/2
$mode == bless( {"sign" => "+","value" => bless( [1], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $IPV6_COUNTRY_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
$mode == bless( {"sign" => "+","value" => bless( [1], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) $IPV6_COUNTRY_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
Truth table33%1/3
A and B
A= $mode == bless( {"sign" => "+","value" => bless( [1], 'Math::BigInt::Calc' )}, 'Math::BigInt' )B= $IPV6_COUNTRY_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
ABresult
0X0
100
111
579 0 return NOT_SUPPORTED;
580 }
581 10 ▶ if (($mode == COUNTRYLONG) && ($IPV6_COUNTRY_POSITION[$dbtype] == 0)) {
Branch: 1 branch
BranchTrueFalseTotal
if ($mode == bless( {"sign" => "+","value" => bless( [2], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $IPV6_COUNTRY_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )) 0 10 10
Condition33%1/3
$mode == bless( {"sign" => "+","value" => bless( [2], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $IPV6_COUNTRY_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
!ll&&!rl&&r
1000
MC/DC0%0/2
$mode == bless( {"sign" => "+","value" => bless( [2], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $IPV6_COUNTRY_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
$mode == bless( {"sign" => "+","value" => bless( [2], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) $IPV6_COUNTRY_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
Truth table33%1/3
A and B
A= $mode == bless( {"sign" => "+","value" => bless( [2], 'Math::BigInt::Calc' )}, 'Math::BigInt' )B= $IPV6_COUNTRY_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
ABresult
0X0
100
111
582 0 return NOT_SUPPORTED;
583 }
584 10 ▶ if (($mode == REGION) && ($IPV6_REGION_POSITION[$dbtype] == 0)) {
Branch: 1 branch
BranchTrueFalseTotal
if ($mode == bless( {"sign" => "+","value" => bless( [3], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $IPV6_REGION_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )) 0 10 10
Condition33%1/3
$mode == bless( {"sign" => "+","value" => bless( [3], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $IPV6_REGION_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
!ll&&!rl&&r
1000
MC/DC0%0/2
$mode == bless( {"sign" => "+","value" => bless( [3], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $IPV6_REGION_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
$mode == bless( {"sign" => "+","value" => bless( [3], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) $IPV6_REGION_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
Truth table33%1/3
A and B
A= $mode == bless( {"sign" => "+","value" => bless( [3], 'Math::BigInt::Calc' )}, 'Math::BigInt' )B= $IPV6_REGION_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
ABresult
0X0
100
111
585 0 return NOT_SUPPORTED;
586 }
587 10 ▶ if (($mode == CITY) && ($IPV6_CITY_POSITION[$dbtype] == 0)) {
Branch: 1 branch
BranchTrueFalseTotal
if ($mode == bless( {"sign" => "+","value" => bless( [4], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $IPV6_CITY_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )) 0 10 10
Condition33%1/3
$mode == bless( {"sign" => "+","value" => bless( [4], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $IPV6_CITY_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
!ll&&!rl&&r
1000
MC/DC0%0/2
$mode == bless( {"sign" => "+","value" => bless( [4], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $IPV6_CITY_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
$mode == bless( {"sign" => "+","value" => bless( [4], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) $IPV6_CITY_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
Truth table33%1/3
A and B
A= $mode == bless( {"sign" => "+","value" => bless( [4], 'Math::BigInt::Calc' )}, 'Math::BigInt' )B= $IPV6_CITY_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
ABresult
0X0
100
111
588 0 return NOT_SUPPORTED;
589 }
590 10 ▶ if (($mode == ISP) && ($IPV6_ISP_POSITION[$dbtype] == 0)) {
Branch: 1 branch
BranchTrueFalseTotal
if ($mode == bless( {"sign" => "+","value" => bless( [5], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $IPV6_ISP_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )) 0 10 10
Condition33%1/3
$mode == bless( {"sign" => "+","value" => bless( [5], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $IPV6_ISP_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
!ll&&!rl&&r
1000
MC/DC0%0/2
$mode == bless( {"sign" => "+","value" => bless( [5], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $IPV6_ISP_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
$mode == bless( {"sign" => "+","value" => bless( [5], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) $IPV6_ISP_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
Truth table33%1/3
A and B
A= $mode == bless( {"sign" => "+","value" => bless( [5], 'Math::BigInt::Calc' )}, 'Math::BigInt' )B= $IPV6_ISP_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
ABresult
0X0
100
111
591 0 return NOT_SUPPORTED;
592 }
593 10 ▶ if (($mode == LATITUDE) && ($IPV6_LATITUDE_POSITION[$dbtype] == 0)) {
Branch: 1 branch
BranchTrueFalseTotal
if ($mode == bless( {"sign" => "+","value" => bless( [6], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $IPV6_LATITUDE_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )) 0 10 10
Condition33%1/3
$mode == bless( {"sign" => "+","value" => bless( [6], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $IPV6_LATITUDE_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
!ll&&!rl&&r
1000
MC/DC0%0/2
$mode == bless( {"sign" => "+","value" => bless( [6], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $IPV6_LATITUDE_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
$mode == bless( {"sign" => "+","value" => bless( [6], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) $IPV6_LATITUDE_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
Truth table33%1/3
A and B
A= $mode == bless( {"sign" => "+","value" => bless( [6], 'Math::BigInt::Calc' )}, 'Math::BigInt' )B= $IPV6_LATITUDE_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
ABresult
0X0
100
111
594 0 return NOT_SUPPORTED;
595 }
596 10 ▶ if (($mode == LONGITUDE) && ($IPV6_LONGITUDE_POSITION[$dbtype] == 0)) {
Branch: 1 branch
BranchTrueFalseTotal
if ($mode == bless( {"sign" => "+","value" => bless( [7], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $IPV6_LONGITUDE_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )) 0 10 10
Condition33%1/3
$mode == bless( {"sign" => "+","value" => bless( [7], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $IPV6_LONGITUDE_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
!ll&&!rl&&r
1000
MC/DC0%0/2
$mode == bless( {"sign" => "+","value" => bless( [7], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $IPV6_LONGITUDE_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
$mode == bless( {"sign" => "+","value" => bless( [7], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) $IPV6_LONGITUDE_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
Truth table33%1/3
A and B
A= $mode == bless( {"sign" => "+","value" => bless( [7], 'Math::BigInt::Calc' )}, 'Math::BigInt' )B= $IPV6_LONGITUDE_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
ABresult
0X0
100
111
597 0 return NOT_SUPPORTED;
598 }
599 10 ▶ if (($mode == DOMAIN) && ($IPV6_DOMAIN_POSITION[$dbtype] == 0)) {
Branch: 1 branch
BranchTrueFalseTotal
if ($mode == bless( {"sign" => "+","value" => bless( [8], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $IPV6_DOMAIN_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )) 0 10 10
Condition33%1/3
$mode == bless( {"sign" => "+","value" => bless( [8], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $IPV6_DOMAIN_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
!ll&&!rl&&r
1000
MC/DC0%0/2
$mode == bless( {"sign" => "+","value" => bless( [8], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $IPV6_DOMAIN_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
$mode == bless( {"sign" => "+","value" => bless( [8], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) $IPV6_DOMAIN_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
Truth table33%1/3
A and B
A= $mode == bless( {"sign" => "+","value" => bless( [8], 'Math::BigInt::Calc' )}, 'Math::BigInt' )B= $IPV6_DOMAIN_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
ABresult
0X0
100
111
600 0 return NOT_SUPPORTED;
601 }
602 10 ▶ if (($mode == ZIPCODE) && ($IPV6_ZIPCODE_POSITION[$dbtype] == 0)) {
Branch: 1 branch
BranchTrueFalseTotal
if ($mode == bless( {"sign" => "+","value" => bless( [9], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $IPV6_ZIPCODE_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )) 0 10 10
Condition33%1/3
$mode == bless( {"sign" => "+","value" => bless( [9], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $IPV6_ZIPCODE_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
!ll&&!rl&&r
1000
MC/DC0%0/2
$mode == bless( {"sign" => "+","value" => bless( [9], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $IPV6_ZIPCODE_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
$mode == bless( {"sign" => "+","value" => bless( [9], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) $IPV6_ZIPCODE_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
Truth table33%1/3
A and B
A= $mode == bless( {"sign" => "+","value" => bless( [9], 'Math::BigInt::Calc' )}, 'Math::BigInt' )B= $IPV6_ZIPCODE_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
ABresult
0X0
100
111
603 0 return NOT_SUPPORTED;
604 }
605 10 ▶ if (($mode == TIMEZONE) && ($IPV6_TIMEZONE_POSITION[$dbtype] == 0)) {
Branch: 1 branch
BranchTrueFalseTotal
if ($mode == bless( {"sign" => "+","value" => bless( [10], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $IPV6_TIMEZONE_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )) 0 10 10
Condition33%1/3
$mode == bless( {"sign" => "+","value" => bless( [10], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $IPV6_TIMEZONE_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
!ll&&!rl&&r
1000
MC/DC0%0/2
$mode == bless( {"sign" => "+","value" => bless( [10], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $IPV6_TIMEZONE_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
$mode == bless( {"sign" => "+","value" => bless( [10], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) $IPV6_TIMEZONE_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
Truth table33%1/3
A and B
A= $mode == bless( {"sign" => "+","value" => bless( [10], 'Math::BigInt::Calc' )}, 'Math::BigInt' )B= $IPV6_TIMEZONE_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
ABresult
0X0
100
111
606 0 return NOT_SUPPORTED;
607 }
608 10 ▶ if (($mode == NETSPEED) && ($IPV6_NETSPEED_POSITION[$dbtype] == 0)) {
Branch: 1 branch
BranchTrueFalseTotal
if ($mode == bless( {"sign" => "+","value" => bless( [11], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $IPV6_NETSPEED_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )) 0 10 10
Condition33%1/3
$mode == bless( {"sign" => "+","value" => bless( [11], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $IPV6_NETSPEED_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
!ll&&!rl&&r
1000
MC/DC0%0/2
$mode == bless( {"sign" => "+","value" => bless( [11], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $IPV6_NETSPEED_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
$mode == bless( {"sign" => "+","value" => bless( [11], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) $IPV6_NETSPEED_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
Truth table33%1/3
A and B
A= $mode == bless( {"sign" => "+","value" => bless( [11], 'Math::BigInt::Calc' )}, 'Math::BigInt' )B= $IPV6_NETSPEED_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
ABresult
0X0
100
111
609 0 return NOT_SUPPORTED;
610 }
611 10 ▶ if (($mode == IDDCODE) && ($IPV6_IDDCODE_POSITION[$dbtype] == 0)) {
Branch: 1 branch
BranchTrueFalseTotal
if ($mode == bless( {"sign" => "+","value" => bless( [12], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $IPV6_IDDCODE_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )) 0 10 10
Condition33%1/3
$mode == bless( {"sign" => "+","value" => bless( [12], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $IPV6_IDDCODE_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
!ll&&!rl&&r
1000
MC/DC0%0/2
$mode == bless( {"sign" => "+","value" => bless( [12], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $IPV6_IDDCODE_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
$mode == bless( {"sign" => "+","value" => bless( [12], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) $IPV6_IDDCODE_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
Truth table33%1/3
A and B
A= $mode == bless( {"sign" => "+","value" => bless( [12], 'Math::BigInt::Calc' )}, 'Math::BigInt' )B= $IPV6_IDDCODE_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
ABresult
0X0
100
111
612 0 return NOT_SUPPORTED;
613 }
614 10 ▶ if (($mode == AREACODE) && ($IPV6_AREACODE_POSITION[$dbtype] == 0)) {
Branch: 1 branch
BranchTrueFalseTotal
if ($mode == bless( {"sign" => "+","value" => bless( [13], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $IPV6_AREACODE_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )) 0 10 10
Condition33%1/3
$mode == bless( {"sign" => "+","value" => bless( [13], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $IPV6_AREACODE_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
!ll&&!rl&&r
1000
MC/DC0%0/2
$mode == bless( {"sign" => "+","value" => bless( [13], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $IPV6_AREACODE_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
$mode == bless( {"sign" => "+","value" => bless( [13], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) $IPV6_AREACODE_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
Truth table33%1/3
A and B
A= $mode == bless( {"sign" => "+","value" => bless( [13], 'Math::BigInt::Calc' )}, 'Math::BigInt' )B= $IPV6_AREACODE_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
ABresult
0X0
100
111
615 0 return NOT_SUPPORTED;
616 }
617 10 ▶ if (($mode == WEATHERSTATIONCODE) && ($IPV6_WEATHERSTATIONCODE_POSITION[$dbtype] == 0)) {
Branch: 1 branch
BranchTrueFalseTotal
if ($mode == bless( {"sign" => "+","value" => bless( [14], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $IPV6_WEATHERSTATIONCODE_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )) 0 10 10
Condition33%1/3
$mode == bless( {"sign" => "+","value" => bless( [14], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $IPV6_WEATHERSTATIONCODE_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
!ll&&!rl&&r
1000
MC/DC0%0/2
$mode == bless( {"sign" => "+","value" => bless( [14], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $IPV6_WEATHERSTATIONCODE_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
$mode == bless( {"sign" => "+","value" => bless( [14], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) $IPV6_WEATHERSTATIONCODE_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
Truth table33%1/3
A and B
A= $mode == bless( {"sign" => "+","value" => bless( [14], 'Math::BigInt::Calc' )}, 'Math::BigInt' )B= $IPV6_WEATHERSTATIONCODE_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
ABresult
0X0
100
111
618 0 return NOT_SUPPORTED;
619 }
620 10 ▶ if (($mode == WEATHERSTATIONNAME) && ($IPV6_WEATHERSTATIONNAME_POSITION[$dbtype] == 0)) {
Branch: 1 branch
BranchTrueFalseTotal
if ($mode == bless( {"sign" => "+","value" => bless( [15], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $IPV6_WEATHERSTATIONNAME_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )) 0 10 10
Condition33%1/3
$mode == bless( {"sign" => "+","value" => bless( [15], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $IPV6_WEATHERSTATIONNAME_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
!ll&&!rl&&r
1000
MC/DC0%0/2
$mode == bless( {"sign" => "+","value" => bless( [15], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $IPV6_WEATHERSTATIONNAME_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
$mode == bless( {"sign" => "+","value" => bless( [15], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) $IPV6_WEATHERSTATIONNAME_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
Truth table33%1/3
A and B
A= $mode == bless( {"sign" => "+","value" => bless( [15], 'Math::BigInt::Calc' )}, 'Math::BigInt' )B= $IPV6_WEATHERSTATIONNAME_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
ABresult
0X0
100
111
621 0 return NOT_SUPPORTED;
622 }
623 10 ▶ if (($mode == MCC) && ($IPV6_MCC_POSITION[$dbtype] == 0)) {
Branch: 1 branch
BranchTrueFalseTotal
if ($mode == bless( {"sign" => "+","value" => bless( [16], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $IPV6_MCC_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )) 0 10 10
Condition33%1/3
$mode == bless( {"sign" => "+","value" => bless( [16], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $IPV6_MCC_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
!ll&&!rl&&r
1000
MC/DC0%0/2
$mode == bless( {"sign" => "+","value" => bless( [16], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $IPV6_MCC_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
$mode == bless( {"sign" => "+","value" => bless( [16], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) $IPV6_MCC_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
Truth table33%1/3
A and B
A= $mode == bless( {"sign" => "+","value" => bless( [16], 'Math::BigInt::Calc' )}, 'Math::BigInt' )B= $IPV6_MCC_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
ABresult
0X0
100
111
624 0 return NOT_SUPPORTED;
625 }
626 10 ▶ if (($mode == MNC) && ($IPV6_MNC_POSITION[$dbtype] == 0)) {
Branch: 1 branch
BranchTrueFalseTotal
if ($mode == bless( {"sign" => "+","value" => bless( [17], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $IPV6_MNC_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )) 0 10 10
Condition33%1/3
$mode == bless( {"sign" => "+","value" => bless( [17], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $IPV6_MNC_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
!ll&&!rl&&r
1000
MC/DC0%0/2
$mode == bless( {"sign" => "+","value" => bless( [17], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $IPV6_MNC_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
$mode == bless( {"sign" => "+","value" => bless( [17], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) $IPV6_MNC_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
Truth table33%1/3
A and B
A= $mode == bless( {"sign" => "+","value" => bless( [17], 'Math::BigInt::Calc' )}, 'Math::BigInt' )B= $IPV6_MNC_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
ABresult
0X0
100
111
627 0 return NOT_SUPPORTED;
628 }
629 10 ▶ if (($mode == MOBILEBRAND) && ($IPV6_MOBILEBRAND_POSITION[$dbtype] == 0)) {
Branch: 1 branch
BranchTrueFalseTotal
if ($mode == bless( {"sign" => "+","value" => bless( [18], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $IPV6_MOBILEBRAND_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )) 0 10 10
Condition33%1/3
$mode == bless( {"sign" => "+","value" => bless( [18], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $IPV6_MOBILEBRAND_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
!ll&&!rl&&r
1000
MC/DC0%0/2
$mode == bless( {"sign" => "+","value" => bless( [18], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $IPV6_MOBILEBRAND_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
$mode == bless( {"sign" => "+","value" => bless( [18], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) $IPV6_MOBILEBRAND_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
Truth table33%1/3
A and B
A= $mode == bless( {"sign" => "+","value" => bless( [18], 'Math::BigInt::Calc' )}, 'Math::BigInt' )B= $IPV6_MOBILEBRAND_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
ABresult
0X0
100
111
630 0 return NOT_SUPPORTED;
631 }
632 10 ▶ if (($mode == ELEVATION) && ($IPV6_ELEVATION_POSITION[$dbtype] == 0)) {
Branch: 1 branch
BranchTrueFalseTotal
if ($mode == bless( {"sign" => "+","value" => bless( [19], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $IPV6_ELEVATION_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )) 0 10 10
Condition33%1/3
$mode == bless( {"sign" => "+","value" => bless( [19], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $IPV6_ELEVATION_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
!ll&&!rl&&r
1000
MC/DC0%0/2
$mode == bless( {"sign" => "+","value" => bless( [19], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $IPV6_ELEVATION_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
$mode == bless( {"sign" => "+","value" => bless( [19], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) $IPV6_ELEVATION_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
Truth table33%1/3
A and B
A= $mode == bless( {"sign" => "+","value" => bless( [19], 'Math::BigInt::Calc' )}, 'Math::BigInt' )B= $IPV6_ELEVATION_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
ABresult
0X0
100
111
633 0 return NOT_SUPPORTED;
634 }
635 10 ▶ if (($mode == USAGETYPE) && ($IPV6_USAGETYPE_POSITION[$dbtype] == 0)) {
Branch: 1 branch
BranchTrueFalseTotal
if ($mode == bless( {"sign" => "+","value" => bless( [20], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $IPV6_USAGETYPE_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )) 0 10 10
Condition33%1/3
$mode == bless( {"sign" => "+","value" => bless( [20], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $IPV6_USAGETYPE_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
!ll&&!rl&&r
1000
MC/DC0%0/2
$mode == bless( {"sign" => "+","value" => bless( [20], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $IPV6_USAGETYPE_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
$mode == bless( {"sign" => "+","value" => bless( [20], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) $IPV6_USAGETYPE_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
Truth table33%1/3
A and B
A= $mode == bless( {"sign" => "+","value" => bless( [20], 'Math::BigInt::Calc' )}, 'Math::BigInt' )B= $IPV6_USAGETYPE_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
ABresult
0X0
100
111
636 0 return NOT_SUPPORTED;
637 }
638 10 ▶ if (($mode == ADDRESSTYPE) && ($IPV6_ADDRESSTYPE_POSITION[$dbtype] == 0)) {
Branch: 1 branch
BranchTrueFalseTotal
if ($mode == bless( {"sign" => "+","value" => bless( [21], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $IPV6_ADDRESSTYPE_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )) 0 10 10
Condition33%1/3
$mode == bless( {"sign" => "+","value" => bless( [21], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $IPV6_ADDRESSTYPE_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
!ll&&!rl&&r
1000
MC/DC0%0/2
$mode == bless( {"sign" => "+","value" => bless( [21], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $IPV6_ADDRESSTYPE_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
$mode == bless( {"sign" => "+","value" => bless( [21], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) $IPV6_ADDRESSTYPE_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
Truth table33%1/3
A and B
A= $mode == bless( {"sign" => "+","value" => bless( [21], 'Math::BigInt::Calc' )}, 'Math::BigInt' )B= $IPV6_ADDRESSTYPE_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
ABresult
0X0
100
111
639 0 return NOT_SUPPORTED;
640 }
641 10 ▶ if (($mode == CATEGORY) && ($IPV6_CATEGORY_POSITION[$dbtype] == 0)) {
Branch: 1 branch
BranchTrueFalseTotal
if ($mode == bless( {"sign" => "+","value" => bless( [22], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $IPV6_CATEGORY_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )) 0 10 10
Condition33%1/3
$mode == bless( {"sign" => "+","value" => bless( [22], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $IPV6_CATEGORY_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
!ll&&!rl&&r
1000
MC/DC0%0/2
$mode == bless( {"sign" => "+","value" => bless( [22], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $IPV6_CATEGORY_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
$mode == bless( {"sign" => "+","value" => bless( [22], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) $IPV6_CATEGORY_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
Truth table33%1/3
A and B
A= $mode == bless( {"sign" => "+","value" => bless( [22], 'Math::BigInt::Calc' )}, 'Math::BigInt' )B= $IPV6_CATEGORY_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
ABresult
0X0
100
111
642 0 return NOT_SUPPORTED;
643 }
644  
645 10 my $realipno = $ipnum;
646 10 my $handle = $obj->{"filehandle"};
647 10 my $baseaddr = $obj->{"ipv6databaseaddr"};
648 10 my $dbcount = $obj->{"ipv6databasecount"};
649 10 my $dbcolumn = $obj->{"databasecolumn"};
650 10 my $indexbaseaddr = $obj->{"ipv6indexbaseaddr"};
651  
652 10 ▶ if ($dbcount == 0) {
Branch: 1 branch
BranchTrueFalseTotal
if ($dbcount == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )) 0 10 10
653 0 ▶ if ($mode == ALL) {
Branch: 1 branch
BranchTrueFalseTotal
if ($mode == {sign => '+', value => ['100']}) { } 0 0 0
654 0 return (IPV6_ADDRESS_IN_IPV4_BIN, IPV6_ADDRESS_IN_IPV4_BIN, IPV6_ADDRESS_IN_IPV4_BIN, IPV6_ADDRESS_IN_IPV4_BIN, IPV6_ADDRESS_IN_IPV4_BIN, IPV6_ADDRESS_IN_IPV4_BIN, IPV6_ADDRESS_IN_IPV4_BIN, IPV6_ADDRESS_IN_IPV4_BIN, IPV6_ADDRESS_IN_IPV4_BIN, IPV6_ADDRESS_IN_IPV4_BIN, IPV6_ADDRESS_IN_IPV4_BIN, IPV6_ADDRESS_IN_IPV4_BIN, IPV6_ADDRESS_IN_IPV4_BIN, IPV6_ADDRESS_IN_IPV4_BIN, IPV6_ADDRESS_IN_IPV4_BIN, IPV6_ADDRESS_IN_IPV4_BIN, IPV6_ADDRESS_IN_IPV4_BIN, IPV6_ADDRESS_IN_IPV4_BIN, IPV6_ADDRESS_IN_IPV4_BIN, IPV6_ADDRESS_IN_IPV4_BIN, IPV6_ADDRESS_IN_IPV4_BIN, IPV6_ADDRESS_IN_IPV4_BIN);
655 } else {
656 0 return IPV6_ADDRESS_IN_IPV4_BIN;
657 }
658 }
659  
660 10 my $ipnum1_2 = new Math::BigInt($ipnum);
661 10 my $remainder = 0;
662 10 ($ipnum1_2, $remainder) = $ipnum1_2->bdiv(2**112);
663 10 my $indexaddr = $indexbaseaddr + ($ipnum1_2 << 3);
664  
665 10 my $low = 0;
666 10 my $high = $dbcount;
667 10 ▶ if ($indexbaseaddr > 0) {
Branch: 1 branch
BranchTrueFalseTotal
if ($indexbaseaddr > bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )) 10 0 10
668 10 ($low, $high) = $obj->read32x2($handle, $indexaddr);
669 }
670  
671 10 my $mid = 0;
672 10 my $ipfrom = 0;
673 10 my $ipto = 0;
674 10 my $ipno = 0;
675  
676 10 $ipno = $realipno;
677 10 ▶ if ($realipno == "340282366920938463463374607431768211455") {
Branch: 1 branch
BranchTrueFalseTotal
if ($realipno == "340282366920938463463374607431768211455") 0 10 10
678 0 $ipno = $ipno->bsub(1);
679 }
680  
681 10 my $raw_positions_row;
682
683 10 ▶ while ($low <= $high) {
Branch: 1 branch
BranchTrueFalseTotal
if ($low <= $high) 104 0 104
684 104 $mid = int(($low + $high)/2);
685 104 ($ipfrom, $ipto, $raw_positions_row) = $obj->readRow128($handle, $baseaddr + $mid * (($dbcolumn * 4) + 12), $dbcolumn);
686
687 104 ▶ if (($ipno >= $ipfrom) && ($ipno < $ipto)) {
Branch: 1 branch
BranchTrueFalseTotal
if ($ipno >= $ipfrom and $ipno < $ipto) { } 10 94 104
Condition100%3/3
$ipno >= $ipfrom and $ipno < $ipto
!ll&&!rl&&r
821210
MC/DC100%2/2
$ipno >= $ipfrom and $ipno < $ipto
$ipno >= $ipfrom $ipno < $ipto
Truth table100%3/3
A and B
A= $ipno >= $ipfromB= $ipno < $ipto
ABresult
0X0
100
111
688 10 my $row_pointer = $baseaddr + $mid * (($dbcolumn * 4) + 12);
689
690 10 ▶ if ($mode == ALL) {
Branch: 1 branch
BranchTrueFalseTotal
if ($mode == bless( {"sign" => "+","value" => bless( [100], 'Math::BigInt::Calc' )}, 'Math::BigInt' )) 0 10 10
691 0 my $country_short = NOT_SUPPORTED;
692 0 my $country_long = NOT_SUPPORTED;
693 0 my $region = NOT_SUPPORTED;
694 0 my $city = NOT_SUPPORTED;
695 0 my $isp = NOT_SUPPORTED;
696 0 my $latitude = NOT_SUPPORTED;
697 0 my $longitude = NOT_SUPPORTED;
698 0 my $domain = NOT_SUPPORTED;
699 0 my $zipcode = NOT_SUPPORTED;
700 0 my $timezone = NOT_SUPPORTED;
701 0 my $netspeed = NOT_SUPPORTED;
702 0 my $iddcode = NOT_SUPPORTED;
703 0 my $areacode = NOT_SUPPORTED;
704 0 my $weatherstationcode = NOT_SUPPORTED;
705 0 my $weatherstationname = NOT_SUPPORTED;
706 0 my $mcc = NOT_SUPPORTED;
707 0 my $mnc = NOT_SUPPORTED;
708 0 my $mobilebrand = NOT_SUPPORTED;
709 0 my $elevation = NOT_SUPPORTED;
710 0 my $usagetype = NOT_SUPPORTED;
711 0 my $addresstype = NOT_SUPPORTED;
712 0 my $category = NOT_SUPPORTED;
713
714 0 ▶ if ($IPV6_COUNTRY_POSITION[$dbtype] != 0) {
Branch: 1 branch
BranchTrueFalseTotal
if ($IPV6_COUNTRY_POSITION[$dbtype] != bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )) 0 0 0
715 0 $country_short = $obj->readStr($handle, unpack("V", substr($raw_positions_row, 4 * ($IPV6_COUNTRY_POSITION[$dbtype]+2), 4)));
716 0 $country_long = $obj->readStr($handle, unpack("V", substr($raw_positions_row, 4 * ($IPV6_COUNTRY_POSITION[$dbtype]+2), 4)) + 3);
717 }
718 0 ▶ if ($IPV6_REGION_POSITION[$dbtype] != 0) {
Branch: 1 branch
BranchTrueFalseTotal
if ($IPV6_REGION_POSITION[$dbtype] != bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )) 0 0 0
719 0 $region = $obj->readStr($handle, unpack("V", substr($raw_positions_row, 4 * ($IPV6_REGION_POSITION[$dbtype]+2), 4)));
720 }
721 0 ▶ if ($IPV6_CITY_POSITION[$dbtype] != 0) {
Branch: 1 branch
BranchTrueFalseTotal
if ($IPV6_CITY_POSITION[$dbtype] != bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )) 0 0 0
722 0 $city = $obj->readStr($handle, unpack("V", substr($raw_positions_row, 4 * ($IPV6_CITY_POSITION[$dbtype]+2), 4)));
723 }
724 0 ▶ if ($IPV6_ISP_POSITION[$dbtype] != 0) {
Branch: 1 branch
BranchTrueFalseTotal
if ($IPV6_ISP_POSITION[$dbtype] != bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )) 0 0 0
725 0 $isp = $obj->readStr($handle, unpack("V", substr($raw_positions_row, 4 * ($IPV6_ISP_POSITION[$dbtype]+2), 4)));
726 }
727 0 ▶ if ($IPV6_LATITUDE_POSITION[$dbtype] != 0) {
Branch: 1 branch
BranchTrueFalseTotal
if ($IPV6_LATITUDE_POSITION[$dbtype] != bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )) 0 0 0
728 0 $latitude = $obj->readFloat(substr($raw_positions_row, 4 * ($IPV6_LATITUDE_POSITION[$dbtype]+2)));
729 0 $latitude = sprintf("%.6f", $latitude);
730 }
731 0 ▶ if ($IPV6_LONGITUDE_POSITION[$dbtype] != 0) {
Branch: 1 branch
BranchTrueFalseTotal
if ($IPV6_LONGITUDE_POSITION[$dbtype] != bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )) 0 0 0
732 0 $longitude = $obj->readFloat(substr($raw_positions_row, 4 * ($IPV6_LONGITUDE_POSITION[$dbtype]+2)));
733 0 $longitude = sprintf("%.6f", $longitude);
734 }
735 0 ▶ if ($IPV6_DOMAIN_POSITION[$dbtype] != 0) {
Branch: 1 branch
BranchTrueFalseTotal
if ($IPV6_DOMAIN_POSITION[$dbtype] != bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )) 0 0 0
736 0 $domain = $obj->readStr($handle, unpack("V", substr($raw_positions_row, 4 * ($IPV6_DOMAIN_POSITION[$dbtype]+2), 4)));
737 }
738 0 ▶ if ($IPV6_ZIPCODE_POSITION[$dbtype] != 0) {
Branch: 1 branch
BranchTrueFalseTotal
if ($IPV6_ZIPCODE_POSITION[$dbtype] != bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )) 0 0 0
739 0 $zipcode = $obj->readStr($handle, unpack("V", substr($raw_positions_row, 4 * ($IPV6_ZIPCODE_POSITION[$dbtype]+2), 4)));
740 }
741 0 ▶ if ($IPV6_TIMEZONE_POSITION[$dbtype] != 0) {
Branch: 1 branch
BranchTrueFalseTotal
if ($IPV6_TIMEZONE_POSITION[$dbtype] != bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )) 0 0 0
742 0 $timezone = $obj->readStr($handle, unpack("V", substr($raw_positions_row, 4 * ($IPV6_TIMEZONE_POSITION[$dbtype]+2), 4)));
743 }
744 0 ▶ if ($IPV6_NETSPEED_POSITION[$dbtype] != 0) {
Branch: 1 branch
BranchTrueFalseTotal
if ($IPV6_NETSPEED_POSITION[$dbtype] != bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )) 0 0 0
745 0 $netspeed = $obj->readStr($handle, unpack("V", substr($raw_positions_row, 4 * ($IPV6_NETSPEED_POSITION[$dbtype]+2), 4)));
746 }
747 0 ▶ if ($IPV6_IDDCODE_POSITION[$dbtype] != 0) {
Branch: 1 branch
BranchTrueFalseTotal
if ($IPV6_IDDCODE_POSITION[$dbtype] != bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )) 0 0 0
748 0 $iddcode = $obj->readStr($handle, unpack("V", substr($raw_positions_row, 4 * ($IPV6_IDDCODE_POSITION[$dbtype]+2), 4)));
749 }
750 0 ▶ if ($IPV6_AREACODE_POSITION[$dbtype] != 0) {
Branch: 1 branch
BranchTrueFalseTotal
if ($IPV6_AREACODE_POSITION[$dbtype] != bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )) 0 0 0
751 0 $areacode = $obj->readStr($handle, unpack("V", substr($raw_positions_row, 4 * ($IPV6_AREACODE_POSITION[$dbtype]+2), 4)));
752 }
753 0 ▶ if ($IPV6_WEATHERSTATIONCODE_POSITION[$dbtype] != 0) {
Branch: 1 branch
BranchTrueFalseTotal
if ($IPV6_WEATHERSTATIONCODE_POSITION[$dbtype] != bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )) 0 0 0
754 0 $weatherstationcode = $obj->readStr($handle, unpack("V", substr($raw_positions_row, 4 * ($IPV6_WEATHERSTATIONCODE_POSITION[$dbtype]+2), 4)));
755 }
756 0 ▶ if ($IPV6_WEATHERSTATIONNAME_POSITION[$dbtype] != 0) {
Branch: 1 branch
BranchTrueFalseTotal
if ($IPV6_WEATHERSTATIONNAME_POSITION[$dbtype] != bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )) 0 0 0
757 0 $weatherstationname = $obj->readStr($handle, unpack("V", substr($raw_positions_row, 4 * ($IPV6_WEATHERSTATIONNAME_POSITION[$dbtype]+2), 4)));
758 }
759 0 ▶ if ($IPV6_MCC_POSITION[$dbtype] != 0) {
Branch: 1 branch
BranchTrueFalseTotal
if ($IPV6_MCC_POSITION[$dbtype] != bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )) 0 0 0
760 0 $mcc = $obj->readStr($handle, unpack("V", substr($raw_positions_row, 4 * ($IPV6_MCC_POSITION[$dbtype]+2), 4)));
761 }
762 0 ▶ if ($IPV6_MNC_POSITION[$dbtype] != 0) {
Branch: 1 branch
BranchTrueFalseTotal
if ($IPV6_MNC_POSITION[$dbtype] != bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )) 0 0 0
763 0 $mnc = $obj->readStr($handle, unpack("V", substr($raw_positions_row, 4 * ($IPV6_MNC_POSITION[$dbtype]+2), 4)));
764 }
765 0 ▶ if ($IPV6_MOBILEBRAND_POSITION[$dbtype] != 0) {
Branch: 1 branch
BranchTrueFalseTotal
if ($IPV6_MOBILEBRAND_POSITION[$dbtype] != bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )) 0 0 0
766 0 $mobilebrand = $obj->readStr($handle, unpack("V", substr($raw_positions_row, 4 * ($IPV6_MOBILEBRAND_POSITION[$dbtype]+2), 4)));
767 }
768 0 ▶ if ($IPV6_ELEVATION_POSITION[$dbtype] != 0) {
Branch: 1 branch
BranchTrueFalseTotal
if ($IPV6_ELEVATION_POSITION[$dbtype] != bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )) 0 0 0
769 0 $elevation = $obj->readStr($handle, unpack("V", substr($raw_positions_row, 4 * ($IPV6_ELEVATION_POSITION[$dbtype]+2), 4)));
770 }
771 0 ▶ if ($IPV6_USAGETYPE_POSITION[$dbtype] != 0) {
Branch: 1 branch
BranchTrueFalseTotal
if ($IPV6_USAGETYPE_POSITION[$dbtype] != bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )) 0 0 0
772 0 $usagetype = $obj->readStr($handle, unpack("V", substr($raw_positions_row, 4 * ($IPV6_USAGETYPE_POSITION[$dbtype]+2), 4)));
773 }
774 0 ▶ if ($IPV6_ADDRESSTYPE_POSITION[$dbtype] != 0) {
Branch: 1 branch
BranchTrueFalseTotal
if ($IPV6_ADDRESSTYPE_POSITION[$dbtype] != bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )) 0 0 0
775 0 $addresstype = $obj->readStr($handle, unpack("V", substr($raw_positions_row, 4 * ($IPV6_ADDRESSTYPE_POSITION[$dbtype]+2), 4)));
776 }
777 0 ▶ if ($IPV6_CATEGORY_POSITION[$dbtype] != 0) {
Branch: 1 branch
BranchTrueFalseTotal
if ($IPV6_CATEGORY_POSITION[$dbtype] != bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )) 0 0 0
778 0 $category = $obj->readStr($handle, unpack("V", substr($raw_positions_row, 4 * ($IPV6_CATEGORY_POSITION[$dbtype]+2), 4)));
779 }
780 0 return ($country_short, $country_long, $region, $city, $latitude, $longitude, $zipcode, $timezone, $isp, $domain, $netspeed, $iddcode, $areacode, $weatherstationcode, $weatherstationname, $mcc, $mnc, $mobilebrand, $elevation, $usagetype, $addresstype, $category);
781 }
782 10 ▶ if ($mode == COUNTRYSHORT) {
Branch: 1 branch
BranchTrueFalseTotal
if ($mode == bless( {"sign" => "+","value" => bless( [1], 'Math::BigInt::Calc' )}, 'Math::BigInt' )) 10 0 10
783 10 return $obj->readStr($handle, unpack("V", substr($raw_positions_row, 4 * ($IPV6_COUNTRY_POSITION[$dbtype]+2), 4)));
784 }
785 0 ▶ if ($mode == COUNTRYLONG) {
Branch: 1 branch
BranchTrueFalseTotal
if ($mode == bless( {"sign" => "+","value" => bless( [2], 'Math::BigInt::Calc' )}, 'Math::BigInt' )) 0 0 0
786 0 return $obj->readStr($handle, unpack("V", substr($raw_positions_row, 4 * ($IPV6_COUNTRY_POSITION[$dbtype]+2), 4)) + 3);
787 }
788 0 ▶ if ($mode == REGION) {
Branch: 1 branch
BranchTrueFalseTotal
if ($mode == bless( {"sign" => "+","value" => bless( [3], 'Math::BigInt::Calc' )}, 'Math::BigInt' )) 0 0 0
789 0 return $obj->readStr($handle, unpack("V", substr($raw_positions_row, 4 * ($IPV6_REGION_POSITION[$dbtype]+2), 4)));
790 }
791 0 ▶ if ($mode == CITY) {
Branch: 1 branch
BranchTrueFalseTotal
if ($mode == bless( {"sign" => "+","value" => bless( [4], 'Math::BigInt::Calc' )}, 'Math::BigInt' )) 0 0 0
792 0 return $obj->readStr($handle, unpack("V", substr($raw_positions_row, 4 * ($IPV6_CITY_POSITION[$dbtype]+2), 4)));
793 }
794 0 ▶ if ($mode == ISP) {
Branch: 1 branch
BranchTrueFalseTotal
if ($mode == bless( {"sign" => "+","value" => bless( [5], 'Math::BigInt::Calc' )}, 'Math::BigInt' )) 0 0 0
795 0 return $obj->readStr($handle, unpack("V", substr($raw_positions_row, 4 * ($IPV6_ISP_POSITION[$dbtype]+2), 4)));
796 }
797 0 ▶ if ($mode == LATITUDE) {
Branch: 1 branch
BranchTrueFalseTotal
if ($mode == bless( {"sign" => "+","value" => bless( [6], 'Math::BigInt::Calc' )}, 'Math::BigInt' )) 0 0 0
798 0 my $lat = $obj->readFloat(substr($raw_positions_row, 4 * ($IPV6_LATITUDE_POSITION[$dbtype]+2)));
799 0 $lat = sprintf("%.6f", $lat);
800 0 return $lat;
801 }
802 0 ▶ if ($mode == LONGITUDE) {
Branch: 1 branch
BranchTrueFalseTotal
if ($mode == bless( {"sign" => "+","value" => bless( [7], 'Math::BigInt::Calc' )}, 'Math::BigInt' )) 0 0 0
803 0 my $lon = $obj->readFloat(substr($raw_positions_row, 4 * ($IPV6_LONGITUDE_POSITION[$dbtype]+2)));
804 0 $lon = sprintf("%.6f", $lon);
805 0 return $lon;
806 }
807 0 ▶ if ($mode == DOMAIN) {
Branch: 1 branch
BranchTrueFalseTotal
if ($mode == bless( {"sign" => "+","value" => bless( [8], 'Math::BigInt::Calc' )}, 'Math::BigInt' )) 0 0 0
808 0 return $obj->readStr($handle, unpack("V", substr($raw_positions_row, 4 * ($IPV6_DOMAIN_POSITION[$dbtype]+2), 4)));
809 }
810 0 ▶ if ($mode == ZIPCODE) {
Branch: 1 branch
BranchTrueFalseTotal
if ($mode == bless( {"sign" => "+","value" => bless( [9], 'Math::BigInt::Calc' )}, 'Math::BigInt' )) 0 0 0
811 0 return $obj->readStr($handle, unpack("V", substr($raw_positions_row, 4 * ($IPV6_ZIPCODE_POSITION[$dbtype]+2), 4)));
812 }
813 0 ▶ if ($mode == TIMEZONE) {
Branch: 1 branch
BranchTrueFalseTotal
if ($mode == bless( {"sign" => "+","value" => bless( [10], 'Math::BigInt::Calc' )}, 'Math::BigInt' )) 0 0 0
814 0 return $obj->readStr($handle, unpack("V", substr($raw_positions_row, 4 * ($IPV6_TIMEZONE_POSITION[$dbtype]+2), 4)));
815 }
816 0 ▶ if ($mode == NETSPEED) {
Branch: 1 branch
BranchTrueFalseTotal
if ($mode == bless( {"sign" => "+","value" => bless( [11], 'Math::BigInt::Calc' )}, 'Math::BigInt' )) 0 0 0
817 0 return $obj->readStr($handle, unpack("V", substr($raw_positions_row, 4 * ($IPV6_NETSPEED_POSITION[$dbtype]+2), 4)));
818 }
819 0 ▶ if ($mode == IDDCODE) {
Branch: 1 branch
BranchTrueFalseTotal
if ($mode == bless( {"sign" => "+","value" => bless( [12], 'Math::BigInt::Calc' )}, 'Math::BigInt' )) 0 0 0
820 0 return $obj->readStr($handle, unpack("V", substr($raw_positions_row, 4 * ($IPV6_IDDCODE_POSITION[$dbtype]+2), 4)));
821 }
822 0 ▶ if ($mode == AREACODE) {
Branch: 1 branch
BranchTrueFalseTotal
if ($mode == bless( {"sign" => "+","value" => bless( [13], 'Math::BigInt::Calc' )}, 'Math::BigInt' )) 0 0 0
823 0 return $obj->readStr($handle, unpack("V", substr($raw_positions_row, 4 * ($IPV6_AREACODE_POSITION[$dbtype]+2), 4)));
824 }
825 0 ▶ if ($mode == WEATHERSTATIONCODE) {
Branch: 1 branch
BranchTrueFalseTotal
if ($mode == bless( {"sign" => "+","value" => bless( [14], 'Math::BigInt::Calc' )}, 'Math::BigInt' )) 0 0 0
826 0 return $obj->readStr($handle, unpack("V", substr($raw_positions_row, 4 * ($IPV6_WEATHERSTATIONCODE_POSITION[$dbtype]+2), 4)));
827 }
828 0 ▶ if ($mode == WEATHERSTATIONNAME) {
Branch: 1 branch
BranchTrueFalseTotal
if ($mode == bless( {"sign" => "+","value" => bless( [15], 'Math::BigInt::Calc' )}, 'Math::BigInt' )) 0 0 0
829 0 return $obj->readStr($handle, unpack("V", substr($raw_positions_row, 4 * ($IPV6_WEATHERSTATIONNAME_POSITION[$dbtype]+2), 4)));
830 }
831 0 ▶ if ($mode == MCC) {
Branch: 1 branch
BranchTrueFalseTotal
if ($mode == bless( {"sign" => "+","value" => bless( [16], 'Math::BigInt::Calc' )}, 'Math::BigInt' )) 0 0 0
832 0 return $obj->readStr($handle, unpack("V", substr($raw_positions_row, 4 * ($IPV6_MCC_POSITION[$dbtype]+2), 4)));
833 }
834 0 ▶ if ($mode == MNC) {
Branch: 1 branch
BranchTrueFalseTotal
if ($mode == bless( {"sign" => "+","value" => bless( [17], 'Math::BigInt::Calc' )}, 'Math::BigInt' )) 0 0 0
835 0 return $obj->readStr($handle, unpack("V", substr($raw_positions_row, 4 * ($IPV6_MNC_POSITION[$dbtype]+2), 4)));
836 }
837 0 ▶ if ($mode == MOBILEBRAND) {
Branch: 1 branch
BranchTrueFalseTotal
if ($mode == bless( {"sign" => "+","value" => bless( [18], 'Math::BigInt::Calc' )}, 'Math::BigInt' )) 0 0 0
838 0 return $obj->readStr($handle, unpack("V", substr($raw_positions_row, 4 * ($IPV6_MOBILEBRAND_POSITION[$dbtype]+2), 4)));
839 }
840 0 ▶ if ($mode == ELEVATION) {
Branch: 1 branch
BranchTrueFalseTotal
if ($mode == bless( {"sign" => "+","value" => bless( [19], 'Math::BigInt::Calc' )}, 'Math::BigInt' )) 0 0 0
841 0 return $obj->readStr($handle, unpack("V", substr($raw_positions_row, 4 * ($IPV6_ELEVATION_POSITION[$dbtype]+2), 4)));
842 }
843 0 ▶ if ($mode == USAGETYPE) {
Branch: 1 branch
BranchTrueFalseTotal
if ($mode == bless( {"sign" => "+","value" => bless( [20], 'Math::BigInt::Calc' )}, 'Math::BigInt' )) 0 0 0
844 0 return $obj->readStr($handle, unpack("V", substr($raw_positions_row, 4 * ($IPV6_USAGETYPE_POSITION[$dbtype]+2), 4)));
845 }
846 0 ▶ if ($mode == ADDRESSTYPE) {
Branch: 1 branch
BranchTrueFalseTotal
if ($mode == bless( {"sign" => "+","value" => bless( [21], 'Math::BigInt::Calc' )}, 'Math::BigInt' )) 0 0 0
847 0 return $obj->readStr($handle, unpack("V", substr($raw_positions_row, 4 * ($IPV6_ADDRESSTYPE_POSITION[$dbtype]+2), 4)));
848 }
849 0 ▶ if ($mode == CATEGORY) {
Branch: 1 branch
BranchTrueFalseTotal
if ($mode == bless( {"sign" => "+","value" => bless( [22], 'Math::BigInt::Calc' )}, 'Math::BigInt' )) 0 0 0
850 0 return $obj->readStr($handle, unpack("V", substr($raw_positions_row, 4 * ($IPV6_CATEGORY_POSITION[$dbtype]+2), 4)));
851 }
852 } else {
853 94 ▶ if ($ipno < $ipfrom) {
Branch: 1 branch
BranchTrueFalseTotal
if ($ipno < $ipfrom) { } 82 12 94
854 82 $high = $mid - 1;
855 } else {
856 12 $low = $mid + 1;
857 }
858 }
859 }
860 0 ▶ if ($mode == ALL) {
Branch: 1 branch
BranchTrueFalseTotal
if ($mode == {sign => '+', value => ['100']}) { } 0 0 0
861 0 return (UNKNOWN, UNKNOWN, UNKNOWN, UNKNOWN, UNKNOWN, UNKNOWN, UNKNOWN, UNKNOWN, UNKNOWN, UNKNOWN, UNKNOWN, UNKNOWN, UNKNOWN, UNKNOWN, UNKNOWN, UNKNOWN, UNKNOWN, UNKNOWN, UNKNOWN, UNKNOWN, UNKNOWN, UNKNOWN);
862 } else {
863 0 return UNKNOWN;
864 }
865 }
866  
867 sub get_ipv4_record {
868 10 ▶ my $obj = shift(@_);
Subroutine get_ipv4_record: called CC=98 SCAR=82.5
Pod undocumented
869 10 my $ipnum = shift(@_);
870 10 my $mode = shift(@_);
871 10 my $dbtype= $obj->{"databasetype"};
872
873 10 ▶ if ($ipnum eq "") {
Branch: 1 branch
BranchTrueFalseTotal
if ($ipnum eq "") 0 10 10
874 0 ▶ if ($mode == ALL) {
Branch: 1 branch
BranchTrueFalseTotal
if ($mode == {sign => '+', value => ['100']}) { } 0 0 0
875 0 return (NO_IP, NO_IP, NO_IP, NO_IP, NO_IP, NO_IP, NO_IP, NO_IP, NO_IP, NO_IP, NO_IP, NO_IP, NO_IP, NO_IP, NO_IP, NO_IP, NO_IP, NO_IP, NO_IP, NO_IP, NO_IP, NO_IP);
876 } else {
877 0 return NO_IP;
878 }
879 }
880
881 10 ▶ if (($mode == COUNTRYSHORT) && ($COUNTRY_POSITION[$dbtype] == 0)) {
Branch: 1 branch
BranchTrueFalseTotal
if ($mode == bless( {"sign" => "+","value" => bless( [1], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $COUNTRY_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )) 0 10 10
Condition33%1/3
$mode == bless( {"sign" => "+","value" => bless( [1], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $COUNTRY_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
!ll&&!rl&&r
0100
MC/DC0%0/2
$mode == bless( {"sign" => "+","value" => bless( [1], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $COUNTRY_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
$mode == bless( {"sign" => "+","value" => bless( [1], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) $COUNTRY_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
Truth table33%1/3
A and B
A= $mode == bless( {"sign" => "+","value" => bless( [1], 'Math::BigInt::Calc' )}, 'Math::BigInt' )B= $COUNTRY_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
ABresult
0X0
100
111
882 0 return NOT_SUPPORTED;
883 }
884 10 ▶ if (($mode == COUNTRYLONG) && ($COUNTRY_POSITION[$dbtype] == 0)) {
Branch: 1 branch
BranchTrueFalseTotal
if ($mode == bless( {"sign" => "+","value" => bless( [2], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $COUNTRY_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )) 0 10 10
Condition33%1/3
$mode == bless( {"sign" => "+","value" => bless( [2], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $COUNTRY_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
!ll&&!rl&&r
1000
MC/DC0%0/2
$mode == bless( {"sign" => "+","value" => bless( [2], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $COUNTRY_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
$mode == bless( {"sign" => "+","value" => bless( [2], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) $COUNTRY_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
Truth table33%1/3
A and B
A= $mode == bless( {"sign" => "+","value" => bless( [2], 'Math::BigInt::Calc' )}, 'Math::BigInt' )B= $COUNTRY_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
ABresult
0X0
100
111
885 0 return NOT_SUPPORTED;
886 }
887 10 ▶ if (($mode == REGION) && ($REGION_POSITION[$dbtype] == 0)) {
Branch: 1 branch
BranchTrueFalseTotal
if ($mode == bless( {"sign" => "+","value" => bless( [3], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $REGION_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )) 0 10 10
Condition33%1/3
$mode == bless( {"sign" => "+","value" => bless( [3], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $REGION_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
!ll&&!rl&&r
1000
MC/DC0%0/2
$mode == bless( {"sign" => "+","value" => bless( [3], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $REGION_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
$mode == bless( {"sign" => "+","value" => bless( [3], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) $REGION_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
Truth table33%1/3
A and B
A= $mode == bless( {"sign" => "+","value" => bless( [3], 'Math::BigInt::Calc' )}, 'Math::BigInt' )B= $REGION_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
ABresult
0X0
100
111
888 0 return NOT_SUPPORTED;
889 }
890 10 ▶ if (($mode == CITY) && ($CITY_POSITION[$dbtype] == 0)) {
Branch: 1 branch
BranchTrueFalseTotal
if ($mode == bless( {"sign" => "+","value" => bless( [4], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $CITY_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )) 0 10 10
Condition33%1/3
$mode == bless( {"sign" => "+","value" => bless( [4], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $CITY_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
!ll&&!rl&&r
1000
MC/DC0%0/2
$mode == bless( {"sign" => "+","value" => bless( [4], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $CITY_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
$mode == bless( {"sign" => "+","value" => bless( [4], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) $CITY_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
Truth table33%1/3
A and B
A= $mode == bless( {"sign" => "+","value" => bless( [4], 'Math::BigInt::Calc' )}, 'Math::BigInt' )B= $CITY_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
ABresult
0X0
100
111
891 0 return NOT_SUPPORTED;
892 }
893 10 ▶ if (($mode == ISP) && ($ISP_POSITION[$dbtype] == 0)) {
Branch: 1 branch
BranchTrueFalseTotal
if ($mode == bless( {"sign" => "+","value" => bless( [5], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $ISP_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )) 0 10 10
Condition33%1/3
$mode == bless( {"sign" => "+","value" => bless( [5], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $ISP_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
!ll&&!rl&&r
1000
MC/DC0%0/2
$mode == bless( {"sign" => "+","value" => bless( [5], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $ISP_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
$mode == bless( {"sign" => "+","value" => bless( [5], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) $ISP_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
Truth table33%1/3
A and B
A= $mode == bless( {"sign" => "+","value" => bless( [5], 'Math::BigInt::Calc' )}, 'Math::BigInt' )B= $ISP_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
ABresult
0X0
100
111
894 0 return NOT_SUPPORTED;
895 }
896 10 ▶ if (($mode == LATITUDE) && ($LATITUDE_POSITION[$dbtype] == 0)) {
Branch: 1 branch
BranchTrueFalseTotal
if ($mode == bless( {"sign" => "+","value" => bless( [6], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $LATITUDE_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )) 0 10 10
Condition33%1/3
$mode == bless( {"sign" => "+","value" => bless( [6], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $LATITUDE_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
!ll&&!rl&&r
1000
MC/DC0%0/2
$mode == bless( {"sign" => "+","value" => bless( [6], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $LATITUDE_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
$mode == bless( {"sign" => "+","value" => bless( [6], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) $LATITUDE_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
Truth table33%1/3
A and B
A= $mode == bless( {"sign" => "+","value" => bless( [6], 'Math::BigInt::Calc' )}, 'Math::BigInt' )B= $LATITUDE_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
ABresult
0X0
100
111
897 0 return NOT_SUPPORTED;
898 }
899 10 ▶ if (($mode == LONGITUDE) && ($LONGITUDE_POSITION[$dbtype] == 0)) {
Branch: 1 branch
BranchTrueFalseTotal
if ($mode == bless( {"sign" => "+","value" => bless( [7], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $LONGITUDE_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )) 0 10 10
Condition33%1/3
$mode == bless( {"sign" => "+","value" => bless( [7], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $LONGITUDE_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
!ll&&!rl&&r
1000
MC/DC0%0/2
$mode == bless( {"sign" => "+","value" => bless( [7], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $LONGITUDE_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
$mode == bless( {"sign" => "+","value" => bless( [7], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) $LONGITUDE_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
Truth table33%1/3
A and B
A= $mode == bless( {"sign" => "+","value" => bless( [7], 'Math::BigInt::Calc' )}, 'Math::BigInt' )B= $LONGITUDE_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
ABresult
0X0
100
111
900 0 return NOT_SUPPORTED;
901 }
902 10 ▶ if (($mode == DOMAIN) && ($DOMAIN_POSITION[$dbtype] == 0)) {
Branch: 1 branch
BranchTrueFalseTotal
if ($mode == bless( {"sign" => "+","value" => bless( [8], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $DOMAIN_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )) 0 10 10
Condition33%1/3
$mode == bless( {"sign" => "+","value" => bless( [8], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $DOMAIN_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
!ll&&!rl&&r
1000
MC/DC0%0/2
$mode == bless( {"sign" => "+","value" => bless( [8], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $DOMAIN_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
$mode == bless( {"sign" => "+","value" => bless( [8], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) $DOMAIN_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
Truth table33%1/3
A and B
A= $mode == bless( {"sign" => "+","value" => bless( [8], 'Math::BigInt::Calc' )}, 'Math::BigInt' )B= $DOMAIN_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
ABresult
0X0
100
111
903 0 return NOT_SUPPORTED;
904 }
905 10 ▶ if (($mode == ZIPCODE) && ($ZIPCODE_POSITION[$dbtype] == 0)) {
Branch: 1 branch
BranchTrueFalseTotal
if ($mode == bless( {"sign" => "+","value" => bless( [9], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $ZIPCODE_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )) 0 10 10
Condition33%1/3
$mode == bless( {"sign" => "+","value" => bless( [9], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $ZIPCODE_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
!ll&&!rl&&r
1000
MC/DC0%0/2
$mode == bless( {"sign" => "+","value" => bless( [9], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $ZIPCODE_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
$mode == bless( {"sign" => "+","value" => bless( [9], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) $ZIPCODE_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
Truth table33%1/3
A and B
A= $mode == bless( {"sign" => "+","value" => bless( [9], 'Math::BigInt::Calc' )}, 'Math::BigInt' )B= $ZIPCODE_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
ABresult
0X0
100
111
906 0 return NOT_SUPPORTED;
907 }
908 10 ▶ if (($mode == TIMEZONE) && ($TIMEZONE_POSITION[$dbtype] == 0)) {
Branch: 1 branch
BranchTrueFalseTotal
if ($mode == bless( {"sign" => "+","value" => bless( [10], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $TIMEZONE_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )) 0 10 10
Condition33%1/3
$mode == bless( {"sign" => "+","value" => bless( [10], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $TIMEZONE_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
!ll&&!rl&&r
1000
MC/DC0%0/2
$mode == bless( {"sign" => "+","value" => bless( [10], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $TIMEZONE_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
$mode == bless( {"sign" => "+","value" => bless( [10], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) $TIMEZONE_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
Truth table33%1/3
A and B
A= $mode == bless( {"sign" => "+","value" => bless( [10], 'Math::BigInt::Calc' )}, 'Math::BigInt' )B= $TIMEZONE_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
ABresult
0X0
100
111
909 0 return NOT_SUPPORTED;
910 }
911 10 ▶ if (($mode == NETSPEED) && ($NETSPEED_POSITION[$dbtype] == 0)) {
Branch: 1 branch
BranchTrueFalseTotal
if ($mode == bless( {"sign" => "+","value" => bless( [11], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $NETSPEED_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )) 0 10 10
Condition33%1/3
$mode == bless( {"sign" => "+","value" => bless( [11], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $NETSPEED_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
!ll&&!rl&&r
1000
MC/DC0%0/2
$mode == bless( {"sign" => "+","value" => bless( [11], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $NETSPEED_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
$mode == bless( {"sign" => "+","value" => bless( [11], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) $NETSPEED_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
Truth table33%1/3
A and B
A= $mode == bless( {"sign" => "+","value" => bless( [11], 'Math::BigInt::Calc' )}, 'Math::BigInt' )B= $NETSPEED_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
ABresult
0X0
100
111
912 0 return NOT_SUPPORTED;
913 }
914 10 ▶ if (($mode == IDDCODE) && ($IDDCODE_POSITION[$dbtype] == 0)) {
Branch: 1 branch
BranchTrueFalseTotal
if ($mode == bless( {"sign" => "+","value" => bless( [12], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $IDDCODE_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )) 0 10 10
Condition33%1/3
$mode == bless( {"sign" => "+","value" => bless( [12], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $IDDCODE_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
!ll&&!rl&&r
1000
MC/DC0%0/2
$mode == bless( {"sign" => "+","value" => bless( [12], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $IDDCODE_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
$mode == bless( {"sign" => "+","value" => bless( [12], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) $IDDCODE_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
Truth table33%1/3
A and B
A= $mode == bless( {"sign" => "+","value" => bless( [12], 'Math::BigInt::Calc' )}, 'Math::BigInt' )B= $IDDCODE_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
ABresult
0X0
100
111
915 0 return NOT_SUPPORTED;
916 }
917 10 ▶ if (($mode == AREACODE) && ($AREACODE_POSITION[$dbtype] == 0)) {
Branch: 1 branch
BranchTrueFalseTotal
if ($mode == bless( {"sign" => "+","value" => bless( [13], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $AREACODE_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )) 0 10 10
Condition33%1/3
$mode == bless( {"sign" => "+","value" => bless( [13], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $AREACODE_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
!ll&&!rl&&r
1000
MC/DC0%0/2
$mode == bless( {"sign" => "+","value" => bless( [13], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $AREACODE_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
$mode == bless( {"sign" => "+","value" => bless( [13], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) $AREACODE_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
Truth table33%1/3
A and B
A= $mode == bless( {"sign" => "+","value" => bless( [13], 'Math::BigInt::Calc' )}, 'Math::BigInt' )B= $AREACODE_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
ABresult
0X0
100
111
918 0 return NOT_SUPPORTED;
919 }
920 10 ▶ if (($mode == WEATHERSTATIONCODE) && ($WEATHERSTATIONCODE_POSITION[$dbtype] == 0)) {
Branch: 1 branch
BranchTrueFalseTotal
if ($mode == bless( {"sign" => "+","value" => bless( [14], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $WEATHERSTATIONCODE_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )) 0 10 10
Condition33%1/3
$mode == bless( {"sign" => "+","value" => bless( [14], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $WEATHERSTATIONCODE_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
!ll&&!rl&&r
1000
MC/DC0%0/2
$mode == bless( {"sign" => "+","value" => bless( [14], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $WEATHERSTATIONCODE_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
$mode == bless( {"sign" => "+","value" => bless( [14], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) $WEATHERSTATIONCODE_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
Truth table33%1/3
A and B
A= $mode == bless( {"sign" => "+","value" => bless( [14], 'Math::BigInt::Calc' )}, 'Math::BigInt' )B= $WEATHERSTATIONCODE_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
ABresult
0X0
100
111
921 0 return NOT_SUPPORTED;
922 }
923 10 ▶ if (($mode == WEATHERSTATIONNAME) && ($WEATHERSTATIONNAME_POSITION[$dbtype] == 0)) {
Branch: 1 branch
BranchTrueFalseTotal
if ($mode == bless( {"sign" => "+","value" => bless( [15], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $WEATHERSTATIONNAME_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )) 0 10 10
Condition33%1/3
$mode == bless( {"sign" => "+","value" => bless( [15], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $WEATHERSTATIONNAME_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
!ll&&!rl&&r
1000
MC/DC0%0/2
$mode == bless( {"sign" => "+","value" => bless( [15], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $WEATHERSTATIONNAME_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
$mode == bless( {"sign" => "+","value" => bless( [15], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) $WEATHERSTATIONNAME_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
Truth table33%1/3
A and B
A= $mode == bless( {"sign" => "+","value" => bless( [15], 'Math::BigInt::Calc' )}, 'Math::BigInt' )B= $WEATHERSTATIONNAME_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
ABresult
0X0
100
111
924 0 return NOT_SUPPORTED;
925 }
926 10 ▶ if (($mode == MCC) && ($MCC_POSITION[$dbtype] == 0)) {
Branch: 1 branch
BranchTrueFalseTotal
if ($mode == bless( {"sign" => "+","value" => bless( [16], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $MCC_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )) 0 10 10
Condition33%1/3
$mode == bless( {"sign" => "+","value" => bless( [16], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $MCC_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
!ll&&!rl&&r
1000
MC/DC0%0/2
$mode == bless( {"sign" => "+","value" => bless( [16], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $MCC_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
$mode == bless( {"sign" => "+","value" => bless( [16], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) $MCC_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
Truth table33%1/3
A and B
A= $mode == bless( {"sign" => "+","value" => bless( [16], 'Math::BigInt::Calc' )}, 'Math::BigInt' )B= $MCC_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
ABresult
0X0
100
111
927 0 return NOT_SUPPORTED;
928 }
929 10 ▶ if (($mode == MNC) && ($MNC_POSITION[$dbtype] == 0)) {
Branch: 1 branch
BranchTrueFalseTotal
if ($mode == bless( {"sign" => "+","value" => bless( [17], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $MNC_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )) 0 10 10
Condition33%1/3
$mode == bless( {"sign" => "+","value" => bless( [17], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $MNC_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
!ll&&!rl&&r
1000
MC/DC0%0/2
$mode == bless( {"sign" => "+","value" => bless( [17], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $MNC_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
$mode == bless( {"sign" => "+","value" => bless( [17], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) $MNC_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
Truth table33%1/3
A and B
A= $mode == bless( {"sign" => "+","value" => bless( [17], 'Math::BigInt::Calc' )}, 'Math::BigInt' )B= $MNC_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
ABresult
0X0
100
111
930 0 return NOT_SUPPORTED;
931 }
932 10 ▶ if (($mode == MOBILEBRAND) && ($MOBILEBRAND_POSITION[$dbtype] == 0)) {
Branch: 1 branch
BranchTrueFalseTotal
if ($mode == bless( {"sign" => "+","value" => bless( [18], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $MOBILEBRAND_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )) 0 10 10
Condition33%1/3
$mode == bless( {"sign" => "+","value" => bless( [18], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $MOBILEBRAND_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
!ll&&!rl&&r
1000
MC/DC0%0/2
$mode == bless( {"sign" => "+","value" => bless( [18], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $MOBILEBRAND_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
$mode == bless( {"sign" => "+","value" => bless( [18], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) $MOBILEBRAND_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
Truth table33%1/3
A and B
A= $mode == bless( {"sign" => "+","value" => bless( [18], 'Math::BigInt::Calc' )}, 'Math::BigInt' )B= $MOBILEBRAND_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
ABresult
0X0
100
111
933 0 return NOT_SUPPORTED;
934 }
935 10 ▶ if (($mode == ELEVATION) && ($ELEVATION_POSITION[$dbtype] == 0)) {
Branch: 1 branch
BranchTrueFalseTotal
if ($mode == bless( {"sign" => "+","value" => bless( [19], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $ELEVATION_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )) 0 10 10
Condition33%1/3
$mode == bless( {"sign" => "+","value" => bless( [19], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $ELEVATION_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
!ll&&!rl&&r
1000
MC/DC0%0/2
$mode == bless( {"sign" => "+","value" => bless( [19], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $ELEVATION_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
$mode == bless( {"sign" => "+","value" => bless( [19], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) $ELEVATION_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
Truth table33%1/3
A and B
A= $mode == bless( {"sign" => "+","value" => bless( [19], 'Math::BigInt::Calc' )}, 'Math::BigInt' )B= $ELEVATION_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
ABresult
0X0
100
111
936 0 return NOT_SUPPORTED;
937 }
938 10 ▶ if (($mode == USAGETYPE) && ($USAGETYPE_POSITION[$dbtype] == 0)) {
Branch: 1 branch
BranchTrueFalseTotal
if ($mode == bless( {"sign" => "+","value" => bless( [20], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $USAGETYPE_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )) 0 10 10
Condition33%1/3
$mode == bless( {"sign" => "+","value" => bless( [20], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $USAGETYPE_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
!ll&&!rl&&r
1000
MC/DC0%0/2
$mode == bless( {"sign" => "+","value" => bless( [20], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $USAGETYPE_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
$mode == bless( {"sign" => "+","value" => bless( [20], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) $USAGETYPE_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
Truth table33%1/3
A and B
A= $mode == bless( {"sign" => "+","value" => bless( [20], 'Math::BigInt::Calc' )}, 'Math::BigInt' )B= $USAGETYPE_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
ABresult
0X0
100
111
939 0 return NOT_SUPPORTED;
940 }
941 10 ▶ if (($mode == ADDRESSTYPE) && ($ADDRESSTYPE_POSITION[$dbtype] == 0)) {
Branch: 1 branch
BranchTrueFalseTotal
if ($mode == bless( {"sign" => "+","value" => bless( [21], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $ADDRESSTYPE_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )) 0 10 10
Condition33%1/3
$mode == bless( {"sign" => "+","value" => bless( [21], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $ADDRESSTYPE_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
!ll&&!rl&&r
1000
MC/DC0%0/2
$mode == bless( {"sign" => "+","value" => bless( [21], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $ADDRESSTYPE_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
$mode == bless( {"sign" => "+","value" => bless( [21], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) $ADDRESSTYPE_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
Truth table33%1/3
A and B
A= $mode == bless( {"sign" => "+","value" => bless( [21], 'Math::BigInt::Calc' )}, 'Math::BigInt' )B= $ADDRESSTYPE_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
ABresult
0X0
100
111
942 0 return NOT_SUPPORTED;
943 }
944 10 ▶ if (($mode == CATEGORY) && ($CATEGORY_POSITION[$dbtype] == 0)) {
Branch: 1 branch
BranchTrueFalseTotal
if ($mode == bless( {"sign" => "+","value" => bless( [22], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $CATEGORY_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )) 0 10 10
Condition33%1/3
$mode == bless( {"sign" => "+","value" => bless( [22], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $CATEGORY_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
!ll&&!rl&&r
1000
MC/DC0%0/2
$mode == bless( {"sign" => "+","value" => bless( [22], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $CATEGORY_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
$mode == bless( {"sign" => "+","value" => bless( [22], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) $CATEGORY_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
Truth table33%1/3
A and B
A= $mode == bless( {"sign" => "+","value" => bless( [22], 'Math::BigInt::Calc' )}, 'Math::BigInt' )B= $CATEGORY_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
ABresult
0X0
100
111
945 0 return NOT_SUPPORTED;
946 }
947
948 10 my $realipno = $ipnum;
949 10 my $handle = $obj->{"filehandle"};
950 10 my $baseaddr = $obj->{"ipv4databaseaddr"};
951 10 my $dbcount = $obj->{"ipv4databasecount"};
952 10 my $dbcolumn = $obj->{"databasecolumn"};
953 10 my $indexbaseaddr = $obj->{"ipv4indexbaseaddr"};
954  
955 10 my $ipnum1_2 = int($ipnum >> 16);
956 10 my $indexaddr = $indexbaseaddr + ($ipnum1_2 << 3);
957  
958 10 my $low = 0;
959 10 my $high = $dbcount;
960 10 ▶ if ($indexbaseaddr > 0) {
Branch: 1 branch
BranchTrueFalseTotal
if ($indexbaseaddr > bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )) 10 0 10
961 10 ($low, $high) = $obj->read32x2($handle, $indexaddr);
962 }
963 10 my $mid = 0;
964 10 my $ipfrom = 0;
965 10 my $ipto = 0;
966 10 my $ipno = 0;
967  
968 10 ▶ if ($realipno == MAX_IPV4_RANGE) {
Branch: 1 branch
BranchTrueFalseTotal
if ($realipno == {sign => '+', value => [294967295, 4]}) { } 0 10 10
969 0 $ipno = $realipno - 1;
970 } else {
971 10 $ipno = $realipno;
972 }
973  
974 10 my $raw_positions_row;
975  
976 10 ▶ while ($low <= $high) {
Branch: 1 branch
BranchTrueFalseTotal
if ($low <= $high) 15 0 15
977 15 $mid = int(($low + $high) >> 1);
978  
979 15 ($ipfrom, $ipto, $raw_positions_row) = $obj->readRow32($handle, $baseaddr + $mid * $dbcolumn * 4, $dbcolumn);
980  
981 15 ▶ if (($ipno >= $ipfrom) && ($ipno < $ipto)) {
Branch: 1 branch
BranchTrueFalseTotal
if ($ipno >= $ipfrom and $ipno < $ipto) { } 10 5 15
Condition100%3/3
$ipno >= $ipfrom and $ipno < $ipto
!ll&&!rl&&r
4110
MC/DC100%2/2
$ipno >= $ipfrom and $ipno < $ipto
$ipno >= $ipfrom $ipno < $ipto
Truth table100%3/3
A and B
A= $ipno >= $ipfromB= $ipno < $ipto
ABresult
0X0
100
111
982 10 ▶ if ($mode == ALL) {
Branch: 1 branch
BranchTrueFalseTotal
if ($mode == bless( {"sign" => "+","value" => bless( [100], 'Math::BigInt::Calc' )}, 'Math::BigInt' )) 0 10 10
983 0 my $country_short = NOT_SUPPORTED;
984 0 my $country_long = NOT_SUPPORTED;
985 0 my $region = NOT_SUPPORTED;
986 0 my $city = NOT_SUPPORTED;
987 0 my $isp = NOT_SUPPORTED;
988 0 my $latitude = NOT_SUPPORTED;
989 0 my $longitude = NOT_SUPPORTED;
990 0 my $domain = NOT_SUPPORTED;
991 0 my $zipcode = NOT_SUPPORTED;
992 0 my $timezone = NOT_SUPPORTED;
993 0 my $netspeed = NOT_SUPPORTED;
994 0 my $iddcode = NOT_SUPPORTED;
995 0 my $areacode = NOT_SUPPORTED;
996 0 my $weatherstationcode = NOT_SUPPORTED;
997 0 my $weatherstationname = NOT_SUPPORTED;
998 0 my $mcc = NOT_SUPPORTED;
999 0 my $mnc = NOT_SUPPORTED;
1000 0 my $mobilebrand = NOT_SUPPORTED;
1001 0 my $elevation = NOT_SUPPORTED;
1002 0 my $usagetype = NOT_SUPPORTED;
1003 0 my $addresstype = NOT_SUPPORTED;
1004 0 my $category = NOT_SUPPORTED;
1005
1006 0 ▶ if ($COUNTRY_POSITION[$dbtype] != 0) {
Branch: 1 branch
BranchTrueFalseTotal
if ($COUNTRY_POSITION[$dbtype] != bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )) 0 0 0
1007 0 $country_short = $obj->readStr($handle, unpack("V", substr($raw_positions_row, 4 * ($COUNTRY_POSITION[$dbtype]-1), 4)));
1008 0 $country_long = $obj->readStr($handle, unpack("V", substr($raw_positions_row, 4 * ($COUNTRY_POSITION[$dbtype]-1), 4)) + 3);
1009 }
1010  
1011 0 ▶ if ($REGION_POSITION[$dbtype] != 0) {
Branch: 1 branch
BranchTrueFalseTotal
if ($REGION_POSITION[$dbtype] != bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )) 0 0 0
1012 0 $region = $obj->readStr($handle, unpack("V", substr($raw_positions_row, 4 * ($REGION_POSITION[$dbtype]-1), 4)));
1013 }
1014 0 ▶ if ($CITY_POSITION[$dbtype] != 0) {
Branch: 1 branch
BranchTrueFalseTotal
if ($CITY_POSITION[$dbtype] != bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )) 0 0 0
1015 0 $city = $obj->readStr($handle, unpack("V", substr($raw_positions_row, 4 * ($CITY_POSITION[$dbtype]-1), 4)));
1016 }
1017 0 ▶ if ($ISP_POSITION[$dbtype] != 0) {
Branch: 1 branch
BranchTrueFalseTotal
if ($ISP_POSITION[$dbtype] != bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )) 0 0 0
1018 0 $isp = $obj->readStr($handle, unpack("V", substr($raw_positions_row, 4 * ($ISP_POSITION[$dbtype]-1), 4)));
1019 }
1020 0 ▶ if ($LATITUDE_POSITION[$dbtype] != 0) {
Branch: 1 branch
BranchTrueFalseTotal
if ($LATITUDE_POSITION[$dbtype] != bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )) 0 0 0
1021 0 $latitude = $obj->readFloat(substr($raw_positions_row, 4 * ($LATITUDE_POSITION[$dbtype]-1), 4));
1022 0 $latitude = sprintf("%.6f", $latitude);
1023 }
1024 0 ▶ if ($LONGITUDE_POSITION[$dbtype] != 0) {
Branch: 1 branch
BranchTrueFalseTotal
if ($LONGITUDE_POSITION[$dbtype] != bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )) 0 0 0
1025 0 $longitude = $obj->readFloat(substr($raw_positions_row, 4 * ($LONGITUDE_POSITION[$dbtype]-1), 4));
1026 0 $longitude = sprintf("%.6f", $longitude);
1027 }
1028 0 ▶ if ($DOMAIN_POSITION[$dbtype] != 0) {
Branch: 1 branch
BranchTrueFalseTotal
if ($DOMAIN_POSITION[$dbtype] != bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )) 0 0 0
1029 0 $domain = $obj->readStr($handle, unpack("V", substr($raw_positions_row, 4 * ($DOMAIN_POSITION[$dbtype]-1), 4)));
1030 }
1031 0 ▶ if ($ZIPCODE_POSITION[$dbtype] != 0) {
Branch: 1 branch
BranchTrueFalseTotal
if ($ZIPCODE_POSITION[$dbtype] != bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )) 0 0 0
1032 0 $zipcode = $obj->readStr($handle, unpack("V", substr($raw_positions_row, 4 * ($ZIPCODE_POSITION[$dbtype]-1), 4)));
1033 }
1034 0 ▶ if ($TIMEZONE_POSITION[$dbtype] != 0) {
Branch: 1 branch
BranchTrueFalseTotal
if ($TIMEZONE_POSITION[$dbtype] != bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )) 0 0 0
1035 0 $timezone = $obj->readStr($handle, unpack("V", substr($raw_positions_row, 4 * ($TIMEZONE_POSITION[$dbtype]-1), 4)));
1036 }
1037 0 ▶ if ($NETSPEED_POSITION[$dbtype] != 0) {
Branch: 1 branch
BranchTrueFalseTotal
if ($NETSPEED_POSITION[$dbtype] != bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )) 0 0 0
1038 0 $netspeed = $obj->readStr($handle, unpack("V", substr($raw_positions_row, 4 * ($NETSPEED_POSITION[$dbtype]-1), 4)));
1039 }
1040 0 ▶ if ($IDDCODE_POSITION[$dbtype] != 0) {
Branch: 1 branch
BranchTrueFalseTotal
if ($IDDCODE_POSITION[$dbtype] != bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )) 0 0 0
1041 0 $iddcode = $obj->readStr($handle, unpack("V", substr($raw_positions_row, 4 * ($IDDCODE_POSITION[$dbtype]-1), 4)));
1042 }
1043 0 ▶ if ($AREACODE_POSITION[$dbtype] != 0) {
Branch: 1 branch
BranchTrueFalseTotal
if ($AREACODE_POSITION[$dbtype] != bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )) 0 0 0
1044 0 $areacode = $obj->readStr($handle, unpack("V", substr($raw_positions_row, 4 * ($AREACODE_POSITION[$dbtype]-1), 4)));
1045 }
1046 0 ▶ if ($WEATHERSTATIONCODE_POSITION[$dbtype] != 0) {
Branch: 1 branch
BranchTrueFalseTotal
if ($WEATHERSTATIONCODE_POSITION[$dbtype] != bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )) 0 0 0
1047 0 $weatherstationcode = $obj->readStr($handle, unpack("V", substr($raw_positions_row, 4 * ($WEATHERSTATIONCODE_POSITION[$dbtype]-1), 4)));
1048 }
1049 0 ▶ if ($WEATHERSTATIONNAME_POSITION[$dbtype] != 0) {
Branch: 1 branch
BranchTrueFalseTotal
if ($WEATHERSTATIONNAME_POSITION[$dbtype] != bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )) 0 0 0
1050 0 $weatherstationname = $obj->readStr($handle, unpack("V", substr($raw_positions_row, 4 * ($WEATHERSTATIONNAME_POSITION[$dbtype]-1), 4)));
1051 }
1052 0 ▶ if ($MCC_POSITION[$dbtype] != 0) {
Branch: 1 branch
BranchTrueFalseTotal
if ($MCC_POSITION[$dbtype] != bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )) 0 0 0
1053 0 $mcc = $obj->readStr($handle, unpack("V", substr($raw_positions_row, 4 * ($MCC_POSITION[$dbtype]-1), 4)));
1054 }
1055 0 ▶ if ($MNC_POSITION[$dbtype] != 0) {
Branch: 1 branch
BranchTrueFalseTotal
if ($MNC_POSITION[$dbtype] != bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )) 0 0 0
1056 0 $mnc = $obj->readStr($handle, unpack("V", substr($raw_positions_row, 4 * ($MNC_POSITION[$dbtype]-1), 4)));
1057 }
1058 0 ▶ if ($MOBILEBRAND_POSITION[$dbtype] != 0) {
Branch: 1 branch
BranchTrueFalseTotal
if ($MOBILEBRAND_POSITION[$dbtype] != bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )) 0 0 0
1059 0 $mobilebrand = $obj->readStr($handle, unpack("V", substr($raw_positions_row, 4 * ($MOBILEBRAND_POSITION[$dbtype]-1), 4)));
1060 }
1061 0 ▶ if ($ELEVATION_POSITION[$dbtype] != 0) {
Branch: 1 branch
BranchTrueFalseTotal
if ($ELEVATION_POSITION[$dbtype] != bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )) 0 0 0
1062 0 $elevation = $obj->readStr($handle, unpack("V", substr($raw_positions_row, 4 * ($ELEVATION_POSITION[$dbtype]-1), 4)));
1063 }
1064 0 ▶ if ($USAGETYPE_POSITION[$dbtype] != 0) {
Branch: 1 branch
BranchTrueFalseTotal
if ($USAGETYPE_POSITION[$dbtype] != bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )) 0 0 0
1065 0 $usagetype = $obj->readStr($handle, unpack("V", substr($raw_positions_row, 4 * ($USAGETYPE_POSITION[$dbtype]-1), 4)));
1066 }
1067 0 ▶ if ($ADDRESSTYPE_POSITION[$dbtype] != 0) {
Branch: 1 branch
BranchTrueFalseTotal
if ($ADDRESSTYPE_POSITION[$dbtype] != bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )) 0 0 0
1068 0 $addresstype = $obj->readStr($handle, unpack("V", substr($raw_positions_row, 4 * ($ADDRESSTYPE_POSITION[$dbtype]-1), 4)));
1069 }
1070 0 ▶ if ($CATEGORY_POSITION[$dbtype] != 0) {
Branch: 1 branch
BranchTrueFalseTotal
if ($CATEGORY_POSITION[$dbtype] != bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )) 0 0 0
1071 0 $category = $obj->readStr($handle, unpack("V", substr($raw_positions_row, 4 * ($CATEGORY_POSITION[$dbtype]-1), 4)));
1072 }
1073 0 return ($country_short, $country_long, $region, $city, $latitude, $longitude, $zipcode, $timezone, $isp, $domain, $netspeed, $iddcode, $areacode, $weatherstationcode, $weatherstationname, $mcc, $mnc, $mobilebrand, $elevation, $usagetype, $addresstype, $category);
1074 }
1075 10 ▶ if ($mode == COUNTRYSHORT) {
Branch: 1 branch
BranchTrueFalseTotal
if ($mode == bless( {"sign" => "+","value" => bless( [1], 'Math::BigInt::Calc' )}, 'Math::BigInt' )) 10 0 10
1076 10 return $obj->readStr($handle, unpack("V", substr($raw_positions_row, 4 * ($COUNTRY_POSITION[$dbtype]-1), 4)));
1077 }
1078 0 ▶ if ($mode == COUNTRYLONG) {
Branch: 1 branch
BranchTrueFalseTotal
if ($mode == bless( {"sign" => "+","value" => bless( [2], 'Math::BigInt::Calc' )}, 'Math::BigInt' )) 0 0 0
1079 0 return $obj->readStr($handle, unpack("V", substr($raw_positions_row, 4 * ($COUNTRY_POSITION[$dbtype]-1), 4)) + 3);
1080 }
1081 0 ▶ if ($mode == REGION) {
Branch: 1 branch
BranchTrueFalseTotal
if ($mode == bless( {"sign" => "+","value" => bless( [3], 'Math::BigInt::Calc' )}, 'Math::BigInt' )) 0 0 0
1082 0 return $obj->readStr($handle, unpack("V", substr($raw_positions_row, 4 * ($REGION_POSITION[$dbtype]-1), 4)));
1083 }
1084 0 ▶ if ($mode == CITY) {
Branch: 1 branch
BranchTrueFalseTotal
if ($mode == bless( {"sign" => "+","value" => bless( [4], 'Math::BigInt::Calc' )}, 'Math::BigInt' )) 0 0 0
1085 0 return $obj->readStr($handle, unpack("V", substr($raw_positions_row, 4 * ($CITY_POSITION[$dbtype]-1), 4)));
1086 }
1087 0 ▶ if ($mode == ISP) {
Branch: 1 branch
BranchTrueFalseTotal
if ($mode == bless( {"sign" => "+","value" => bless( [5], 'Math::BigInt::Calc' )}, 'Math::BigInt' )) 0 0 0
1088 0 return $obj->readStr($handle, unpack("V", substr($raw_positions_row, 4 * ($ISP_POSITION[$dbtype]-1), 4)));
1089 }
1090 0 ▶ if ($mode == LATITUDE) {
Branch: 1 branch
BranchTrueFalseTotal
if ($mode == bless( {"sign" => "+","value" => bless( [6], 'Math::BigInt::Calc' )}, 'Math::BigInt' )) 0 0 0
1091 0 my $lat = $obj->readFloat(substr($raw_positions_row, 4 * ($LATITUDE_POSITION[$dbtype]-1), 4));
1092 0 $lat = sprintf("%.6f", $lat);
1093 0 return $lat;
1094 }
1095 0 ▶ if ($mode == LONGITUDE) {
Branch: 1 branch
BranchTrueFalseTotal
if ($mode == bless( {"sign" => "+","value" => bless( [7], 'Math::BigInt::Calc' )}, 'Math::BigInt' )) 0 0 0
1096 0 my $lon = $obj->readFloat(substr($raw_positions_row, 4 * ($LONGITUDE_POSITION[$dbtype]-1), 4));
1097 0 $lon = sprintf("%.6f", $lon);
1098 0 return $lon;
1099 }
1100 0 ▶ if ($mode == DOMAIN) {
Branch: 1 branch
BranchTrueFalseTotal
if ($mode == bless( {"sign" => "+","value" => bless( [8], 'Math::BigInt::Calc' )}, 'Math::BigInt' )) 0 0 0
1101 0 return $obj->readStr($handle, unpack("V", substr($raw_positions_row, 4 * ($DOMAIN_POSITION[$dbtype]-1), 4)));
1102 }
1103 0 ▶ if ($mode == ZIPCODE) {
Branch: 1 branch
BranchTrueFalseTotal
if ($mode == bless( {"sign" => "+","value" => bless( [9], 'Math::BigInt::Calc' )}, 'Math::BigInt' )) 0 0 0
1104 0 return $obj->readStr($handle, unpack("V", substr($raw_positions_row, 4 * ($ZIPCODE_POSITION[$dbtype]-1), 4)));
1105 }
1106 0 ▶ if ($mode == TIMEZONE) {
Branch: 1 branch
BranchTrueFalseTotal
if ($mode == bless( {"sign" => "+","value" => bless( [10], 'Math::BigInt::Calc' )}, 'Math::BigInt' )) 0 0 0
1107 0 return $obj->readStr($handle, unpack("V", substr($raw_positions_row, 4 * ($TIMEZONE_POSITION[$dbtype]-1), 4)));
1108 }
1109 0 ▶ if ($mode == NETSPEED) {
Branch: 1 branch
BranchTrueFalseTotal
if ($mode == bless( {"sign" => "+","value" => bless( [11], 'Math::BigInt::Calc' )}, 'Math::BigInt' )) 0 0 0
1110 0 return $obj->readStr($handle, unpack("V", substr($raw_positions_row, 4 * ($NETSPEED_POSITION[$dbtype]-1), 4)));
1111 }
1112 0 ▶ if ($mode == IDDCODE) {
Branch: 1 branch
BranchTrueFalseTotal
if ($mode == bless( {"sign" => "+","value" => bless( [12], 'Math::BigInt::Calc' )}, 'Math::BigInt' )) 0 0 0
1113 0 return $obj->readStr($handle, unpack("V", substr($raw_positions_row, 4 * ($IDDCODE_POSITION[$dbtype]-1), 4)));
1114 }
1115 0 ▶ if ($mode == AREACODE) {
Branch: 1 branch
BranchTrueFalseTotal
if ($mode == bless( {"sign" => "+","value" => bless( [13], 'Math::BigInt::Calc' )}, 'Math::BigInt' )) 0 0 0
1116 0 return $obj->readStr($handle, unpack("V", substr($raw_positions_row, 4 * ($AREACODE_POSITION[$dbtype]-1), 4)));
1117 }
1118 0 ▶ if ($mode == WEATHERSTATIONCODE) {
Branch: 1 branch
BranchTrueFalseTotal
if ($mode == bless( {"sign" => "+","value" => bless( [14], 'Math::BigInt::Calc' )}, 'Math::BigInt' )) 0 0 0
1119 0 return $obj->readStr($handle, unpack("V", substr($raw_positions_row, 4 * ($WEATHERSTATIONCODE_POSITION[$dbtype]-1), 4)));
1120 }
1121 0 ▶ if ($mode == WEATHERSTATIONNAME) {
Branch: 1 branch
BranchTrueFalseTotal
if ($mode == bless( {"sign" => "+","value" => bless( [15], 'Math::BigInt::Calc' )}, 'Math::BigInt' )) 0 0 0
1122 0 return $obj->readStr($handle, unpack("V", substr($raw_positions_row, 4 * ($WEATHERSTATIONNAME_POSITION[$dbtype]-1), 4)));
1123 }
1124 0 ▶ if ($mode == MCC) {
Branch: 1 branch
BranchTrueFalseTotal
if ($mode == bless( {"sign" => "+","value" => bless( [16], 'Math::BigInt::Calc' )}, 'Math::BigInt' )) 0 0 0
1125 0 return $obj->readStr($handle, unpack("V", substr($raw_positions_row, 4 * ($MCC_POSITION[$dbtype]-1), 4)));
1126 }
1127 0 ▶ if ($mode == MNC) {
Branch: 1 branch
BranchTrueFalseTotal
if ($mode == bless( {"sign" => "+","value" => bless( [17], 'Math::BigInt::Calc' )}, 'Math::BigInt' )) 0 0 0
1128 0 return $obj->readStr($handle, unpack("V", substr($raw_positions_row, 4 * ($MNC_POSITION[$dbtype]-1), 4)));
1129 }
1130 0 ▶ if ($mode == MOBILEBRAND) {
Branch: 1 branch
BranchTrueFalseTotal
if ($mode == bless( {"sign" => "+","value" => bless( [18], 'Math::BigInt::Calc' )}, 'Math::BigInt' )) 0 0 0
1131 0 return $obj->readStr($handle, unpack("V", substr($raw_positions_row, 4 * ($MOBILEBRAND_POSITION[$dbtype]-1), 4)));
1132 }
1133 0 ▶ if ($mode == ELEVATION) {
Branch: 1 branch
BranchTrueFalseTotal
if ($mode == bless( {"sign" => "+","value" => bless( [19], 'Math::BigInt::Calc' )}, 'Math::BigInt' )) 0 0 0
1134 0 return $obj->readStr($handle, unpack("V", substr($raw_positions_row, 4 * ($ELEVATION_POSITION[$dbtype]-1), 4)));
1135 }
1136 0 ▶ if ($mode == USAGETYPE) {
Branch: 1 branch
BranchTrueFalseTotal
if ($mode == bless( {"sign" => "+","value" => bless( [20], 'Math::BigInt::Calc' )}, 'Math::BigInt' )) 0 0 0
1137 0 return $obj->readStr($handle, unpack("V", substr($raw_positions_row, 4 * ($USAGETYPE_POSITION[$dbtype]-1), 4)));
1138 }
1139 0 ▶ if ($mode == ADDRESSTYPE) {
Branch: 1 branch
BranchTrueFalseTotal
if ($mode == bless( {"sign" => "+","value" => bless( [21], 'Math::BigInt::Calc' )}, 'Math::BigInt' )) 0 0 0
1140 0 return $obj->readStr($handle, unpack("V", substr($raw_positions_row, 4 * ($ADDRESSTYPE_POSITION[$dbtype]-1), 4)));
1141 }
1142 0 ▶ if ($mode == CATEGORY) {
Branch: 1 branch
BranchTrueFalseTotal
if ($mode == bless( {"sign" => "+","value" => bless( [22], 'Math::BigInt::Calc' )}, 'Math::BigInt' )) 0 0 0
1143 0 return $obj->readStr($handle, unpack("V", substr($raw_positions_row, 4 * ($CATEGORY_POSITION[$dbtype]-1), 4)));
1144 }
1145 } else {
1146 5 ▶ if ($ipno < $ipfrom) {
Branch: 1 branch
BranchTrueFalseTotal
if ($ipno < $ipfrom) { } 4 1 5
1147 4 $high = $mid - 1;
1148 } else {
1149 1 $low = $mid + 1;
1150 }
1151 }
1152 }
1153 0 ▶ if ($mode == ALL) {
Branch: 1 branch
BranchTrueFalseTotal
if ($mode == {sign => '+', value => ['100']}) { } 0 0 0
1154 0 return (UNKNOWN, UNKNOWN, UNKNOWN, UNKNOWN, UNKNOWN, UNKNOWN, UNKNOWN, UNKNOWN, UNKNOWN, UNKNOWN, UNKNOWN, UNKNOWN, UNKNOWN, UNKNOWN, UNKNOWN, UNKNOWN, UNKNOWN, UNKNOWN, UNKNOWN, UNKNOWN, UNKNOWN, UNKNOWN);
1155 } else {
1156 0 return UNKNOWN;
1157 }
1158 }
1159  
1160 sub readRow32 {
1161 15 ▶ my ($obj, $handle, $position, $column) = @_;
Subroutine readRow32: called CC=1 SCAR=0.0
Pod undocumented
1162 15 my $data = "";
1163 15 my $data_length = $column * 4 + 4;
1164 15 seek($handle, $position-1, 0);
1165 15 read($handle, $data, $data_length);
1166 15 my $ipfrom = substr($data, 0, 4);
1167 15 my $ipfrom_next = substr($data, $data_length - 4, 4);
1168 15 my $result_row = substr($data, 0, $data_length - 4);
1169 15 return (unpack("V", $ipfrom), unpack("V", $ipfrom_next), $result_row);
1170 }
1171  
1172 sub readRow128 {
1173 104 ▶ my ($obj, $handle, $position, $column) = @_;
Subroutine readRow128: called CC=1 SCAR=0.0
Pod undocumented
1174 104 my $data = "";
1175 104 my $data_length = $column * 4 + 12 + 16;
1176 104 seek($handle, $position-1, 0);
1177 104 read($handle, $data, $data_length);
1178 104 my $ipfrom = substr($data, 0, 16);
1179 104 my $ipfrom_next = substr($data, $data_length - 16, 16);
1180 104 my $result_row = substr($data, 0, $data_length - 16);
1181 104 return (&bytesInt($ipfrom), &bytesInt($ipfrom_next), $result_row);
1182 }
1183  
1184 sub read512 {
1185 2 ▶ my ($obj, $handle, $position) = @_;
Subroutine read512: called CC=2 SCAR=7.1
Pod undocumented
1186 2 my $data = "";
1187 2 seek($handle, $position-1, 0);
1188 2 read($handle, $data, 64);
1189 2 my @data_array = split('', $data);
1190 2 ▶ while ($#data_array < 63) {
Branch: 1 branch
BranchTrueFalseTotal
if ($#data_array < bless( {"sign" => "+","value" => bless( [63], 'Math::BigInt::Calc' )}, 'Math::BigInt' )) 0 2 2
1191 0 $data_array[$#data_array+1] = 0x00;
1192 }
1193 2 return @data_array;
1194 }
1195  
1196 sub read32x2 {
1197 20 ▶ my ($obj, $handle, $position) = @_;
Subroutine read32x2: called CC=1 SCAR=0.0
Pod undocumented
1198 20 my $data = "";
1199 20 seek($handle, $position-1, 0);
1200 20 read($handle, $data, 8);
1201 20 my $data_1 = substr($data, 0, 4);
1202 20 my $data_2 = substr($data, 4, 4);
1203 20 return (unpack("V", $data_1), unpack("V", $data_2));
1204 }
1205  
1206 sub read128 {
1207 0 ▶ my ($obj, $handle, $position) = @_;
Subroutine read128: not called CC=1 SCAR=6.9
Pod undocumented
1208 0 my $data = "";
1209 0 seek($handle, $position-1, 0);
1210 0 read($handle, $data, 16);
1211 0 return &bytesInt($data);
1212 }
1213  
1214 sub read32 {
1215 0 ▶ my ($obj, $handle, $position) = @_;
Subroutine read32: not called CC=1 SCAR=6.9
Pod undocumented
1216 0 my $data = "";
1217 0 seek($handle, $position-1, 0);
1218 0 read($handle, $data, 4);
1219 0 return unpack("V", $data);
1220 }
1221  
1222 sub read8 {
1223 0 ▶ my ($obj, $handle, $position) = @_;
Subroutine read8: not called CC=1 SCAR=6.9
Pod undocumented
1224 0 my $data = "";
1225 0 seek($handle, $position-1, 0);
1226 0 read($handle, $data, 1);
1227 0 return unpack("C", $data);
1228 }
1229  
1230 sub readStr {
1231 20 ▶ my ($obj, $handle, $position) = @_;
Subroutine readStr: called CC=1 SCAR=0.0
Pod undocumented
1232 20 my $data = "";
1233 20 seek($handle, $position, 0);
1234 20 read($handle, $data, 257);
1235 20 my $char_count = unpack("C", substr($data, 0, 1));
1236 20 my $string = substr($data, 1, $char_count);
1237 20 return $string;
1238 }
1239  
1240 sub readFloat {
1241 0 ▶ my ($obj, $data) = @_;
Subroutine readFloat: not called CC=2 SCAR=17.9
Pod undocumented
1242 0 my $is_little_endian = unpack("h*", pack("s", 1));
1243 0 ▶ if ($is_little_endian =~ m/^1/) {
Branch: 1 branch
BranchTrueFalseTotal
if ($is_little_endian =~ /^1/) { } 0 0 0
1244 # "LITTLE ENDIAN - x86\n";
1245 0 return unpack("f", $data);
1246 } else {
1247 # "BIG ENDIAN - MAC\n";
1248 0 return unpack("f", reverse($data));
1249 }
1250 }
1251  
1252 sub bytesInt {
1253 208 ▶ my $binip = shift(@_);
Subroutine bytesInt: called CC=2 SCAR=6.9
Pod undocumented
1254 208 my @array = split(//, $binip);
1255 208 ▶ return 0 if ($#array != 15);
Branch: 1 branch
BranchTrueFalseTotal
if $#array != bless( {"sign" => "+","value" => bless( [15], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) 0 208 208
1256 208 my $ip96_127 = unpack("V", $array[0] . $array[1] . $array[2] . $array[3]);
1257 208 my $ip64_95 = unpack("V", $array[4] . $array[5] . $array[6] . $array[7]);
1258 208 my $ip32_63 = unpack("V", $array[8] . $array[9] . $array[10] . $array[11]);
1259 208 my $ip1_31 = unpack("V", $array[12] . $array[13] . $array[14] . $array[15]);
1260  
1261 208 my $big1 = Math::BigInt->new("$ip96_127");
1262 208 my $big2 = Math::BigInt->new("$ip64_95")->blsft(32);
1263 208 my $big3 = Math::BigInt->new("$ip32_63")->blsft(64);
1264 208 my $big4 = Math::BigInt->new("$ip1_31")->blsft(96);
1265 208 $big1 = $big1->badd($big2)->badd($big3)->badd($big4);
1266
1267 208 return $big1->bstr();
1268 }
1269  
1270 sub validate_ip {
1271 20 ▶ my $obj = shift(@_);
Subroutine validate_ip: called CC=9 SCAR=27.4
Pod undocumented
1272 20 my $ip = shift(@_);
1273 20 my $ipv = -1;
1274 20 my $ipnum = -1;
1275 #name server lookup if domain name
1276 20 $ip = $obj->name2ip($ip);
1277
1278 20 ▶ if ($obj->ip_is_ipv4($ip)) {
Branch: 1 branch
BranchTrueFalseTotal
if ($obj->ip_is_ipv4($ip)) { } 10 10 20
1279 #ipv4 address
1280 10 $ipv = 4;
1281 10 $ipnum = $obj->ip2no($ip);
1282 } else {
1283 #expand ipv6 address
1284 10 $ip = $obj->expand_ipv6_address($ip);
1285 10 ▶ if ($obj->ip_is_ipv6($ip)) {
Branch: 1 branch
BranchTrueFalseTotal
if ($obj->ip_is_ipv6($ip)) { } 10 0 10
1286 #ipv6 address
1287 10 $ipv = 6;
1288 10 $ipnum = $obj->hex2int($ip);
1289
1290 #reformat ipv4 address in ipv6
1291 10 ▶ if (($ipnum >= 281470681743360) && ($ipnum <= 281474976710655)) {
Branch: 1 branch
BranchTrueFalseTotal
if ($ipnum >= bless( {"sign" => "+","value" => bless( [681743360,281470], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $ipnum <= bless( {"sign" => "+","value" => bless( [976710655,281474], 'Math::BigInt::Calc' )}, 'Math::BigInt' )) 0 10 10
Condition33%1/3
$ipnum >= bless( {"sign" => "+","value" => bless( [681743360,281470], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $ipnum <= bless( {"sign" => "+","value" => bless( [976710655,281474], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
!ll&&!rl&&r
0100
MC/DC0%0/2
$ipnum >= bless( {"sign" => "+","value" => bless( [681743360,281470], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $ipnum <= bless( {"sign" => "+","value" => bless( [976710655,281474], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
$ipnum >= bless( {"sign" => "+","value" => bless( [681743360,281470], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) $ipnum <= bless( {"sign" => "+","value" => bless( [976710655,281474], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
Truth table33%1/3
A and B
A= $ipnum >= bless( {"sign" => "+","value" => bless( [681743360,281470], 'Math::BigInt::Calc' )}, 'Math::BigInt' )B= $ipnum <= bless( {"sign" => "+","value" => bless( [976710655,281474], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
ABresult
0X0
100
111
1292 0 $ipv = 4;
1293 0 $ipnum = $ipnum - 281470681743360;
1294 }
1295  
1296 #reformat 6to4 address to ipv4 address 2002:: to 2002:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF
1297 10 ▶ if (($ipnum >= 42545680458834377588178886921629466624) && ($ipnum <= 42550872755692912415807417417958686719)) {
Branch: 1 branch
BranchTrueFalseTotal
if ($ipnum >= bless( {"sign" => "+","value" => bless( [629466624,178886921,834377588,545680458,42], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $ipnum <= bless( {"sign" => "+","value" => bless( [958686719,807417417,692912415,550872755,42], 'Math::BigInt::Calc' )}, 'Math::BigInt' )) 0 10 10
Condition33%1/3
$ipnum >= bless( {"sign" => "+","value" => bless( [629466624,178886921,834377588,545680458,42], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $ipnum <= bless( {"sign" => "+","value" => bless( [958686719,807417417,692912415,550872755,42], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
!ll&&!rl&&r
0100
MC/DC0%0/2
$ipnum >= bless( {"sign" => "+","value" => bless( [629466624,178886921,834377588,545680458,42], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $ipnum <= bless( {"sign" => "+","value" => bless( [958686719,807417417,692912415,550872755,42], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
$ipnum >= bless( {"sign" => "+","value" => bless( [629466624,178886921,834377588,545680458,42], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) $ipnum <= bless( {"sign" => "+","value" => bless( [958686719,807417417,692912415,550872755,42], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
Truth table33%1/3
A and B
A= $ipnum >= bless( {"sign" => "+","value" => bless( [629466624,178886921,834377588,545680458,42], 'Math::BigInt::Calc' )}, 'Math::BigInt' )B= $ipnum <= bless( {"sign" => "+","value" => bless( [958686719,807417417,692912415,550872755,42], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
ABresult
0X0
100
111
1298 0 $ipv = 4;
1299 #bitshift right 80 bits
1300 0 $ipnum->brsft(80);
1301 #bitwise modulus to get the last 32 bit
1302 0 $ipnum->bmod(4294967296);
1303 }
1304  
1305 #reformat Teredo address to ipv4 address 2001:0000:: to 2001:0000:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:
1306 10 ▶ if (($ipnum >= 42540488161975842760550356425300246528) && ($ipnum <= 42540488241204005274814694018844196863)) {
Branch: 1 branch
BranchTrueFalseTotal
if ($ipnum >= bless( {"sign" => "+","value" => bless( [300246528,550356425,975842760,540488161,42], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $ipnum <= bless( {"sign" => "+","value" => bless( [844196863,814694018,204005274,540488241,42], 'Math::BigInt::Calc' )}, 'Math::BigInt' )) 0 10 10
Condition33%1/3
$ipnum >= bless( {"sign" => "+","value" => bless( [300246528,550356425,975842760,540488161,42], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $ipnum <= bless( {"sign" => "+","value" => bless( [844196863,814694018,204005274,540488241,42], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
!ll&&!rl&&r
0100
MC/DC0%0/2
$ipnum >= bless( {"sign" => "+","value" => bless( [300246528,550356425,975842760,540488161,42], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $ipnum <= bless( {"sign" => "+","value" => bless( [844196863,814694018,204005274,540488241,42], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
$ipnum >= bless( {"sign" => "+","value" => bless( [300246528,550356425,975842760,540488161,42], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) $ipnum <= bless( {"sign" => "+","value" => bless( [844196863,814694018,204005274,540488241,42], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
Truth table33%1/3
A and B
A= $ipnum >= bless( {"sign" => "+","value" => bless( [300246528,550356425,975842760,540488161,42], 'Math::BigInt::Calc' )}, 'Math::BigInt' )B= $ipnum <= bless( {"sign" => "+","value" => bless( [844196863,814694018,204005274,540488241,42], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
ABresult
0X0
100
111
1307 0 $ipv = 4;
1308 0 $ipnum = Math::BigInt->new($ipnum);
1309 #bitwise not to invert binary
1310 0 $ipnum->bnot();
1311 #bitwise modulus to get the last 32 bit
1312 0 $ipnum->bmod(4294967296);
1313 }
1314  
1315 } else {
1316 #not IPv4 and IPv6
1317 }
1318 }
1319 20 return ($ipv, $ipnum);
1320 }
1321  
1322 sub expand_ipv6_address {
1323 10 ▶ my $obj = shift(@_);
Subroutine expand_ipv6_address: called CC=7 SCAR=25.3
Pod undocumented
1324 10 my $ip = shift(@_);
1325 10 $ip =~ s/\:\:/\:Z\:/;
1326 10 my @ip = split(/\:/, $ip);
1327 10 my $num = scalar(@ip);
1328  
1329 10 my $l = 8;
1330 10 ▶ if ($ip[$#ip] =~ /^(\d+)\.(\d+)\.(\d+)\.(\d+)$/) {
Branch: 1 branch
BranchTrueFalseTotal
if ($ip[$#ip] =~ /^(\d+)\.(\d+)\.(\d+)\.(\d+)$/) 0 10 10
1331 0 my $a = sprintf("%x", ($1*256 + $2));
1332 0 my $b = sprintf("%x", ($3*256 + $4));
1333 0 $ip[$#ip] = $a;
1334 0 $ip[$#ip+1] = $b;
1335 0 $l--;
1336 }
1337  
1338 10 ▶ if ($#ip == 8) {
Branch: 1 branch
BranchTrueFalseTotal
if ($#ip == bless( {"sign" => "+","value" => bless( [8], 'Math::BigInt::Calc' )}, 'Math::BigInt' )) 0 10 10
1339 0 shift(@ip);
1340 0 $l++;
1341 }
1342  
1343 10 foreach (0..(scalar(@ip)-1)) {
1344 80 ▶ next if (length($ip[$_]) > 3);
Branch: 1 branch
BranchTrueFalseTotal
if length $ip[$_] > bless( {"sign" => "+","value" => bless( [3], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) 80 0 80
1345 0 $ip[$_] = ('0'x(4-length($ip[$_]))).$ip[$_];
1346 }
1347
1348 10 foreach (0..(scalar(@ip)-1)) {
1349 80 ▶ next unless ($ip[$_] eq '000Z');
Branch: 1 branch
BranchTrueFalseTotal
unless $ip[$_] eq "000Z" 80 0 80
1350 0 my @empty = map { $_ = '0'x4 } (0..7);
1351 0 $ip[$_] = join(':', @empty[0..$l-$num]);
1352 0 last;
1353 }
1354  
1355 10 return (uc(join ':', @ip));
1356 }
1357  
1358 sub hex2int {
1359 10 ▶ my $obj = shift(@_);
Subroutine hex2int: called CC=4 SCAR=13.9
Pod undocumented
1360 10 my $hexip = shift(@_);
1361  
1362 10 $hexip =~ s/\://g;
1363  
1364 10 ▶ unless (length($hexip) == 32) {
Branch: 1 branch
BranchTrueFalseTotal
unless (length $hexip == bless( {"sign" => "+","value" => bless( [32], 'Math::BigInt::Calc' )}, 'Math::BigInt' )) 0 10 10
1365 0 return 0;
1366 };
1367  
1368 10 my $binip = unpack('B128', pack('H32', $hexip));
1369 10 my ($n, $dec) = (Math::BigInt->new(1), Math::BigInt->new(0));
1370  
1371 10 foreach (reverse (split('', $binip))) {
1372 1280 ▶ $_ && ($dec += $n);
Branch: 1 branch
BranchTrueFalseTotal
$_ and $dec += $n 56 1224 1280
1373 1280 $n *= 2;
1374 }
1375  
1376 10 $dec =~ s/^\+//;
1377 10 return $dec;
1378 }
1379  
1380 sub ip2no {
1381 10 ▶ my $obj = shift(@_);
Subroutine ip2no: called CC=1 SCAR=0.0
Pod undocumented
1382 10 my $ip = shift(@_);
1383 10 my @block = split(/\./, $ip);
1384 10 my $no = 0;
1385 10 $no = $block[3];
1386 10 $no = $no + $block[2] * 256;
1387 10 $no = $no + $block[1] * 256 * 256;
1388 10 $no = $no + $block[0] * 256 * 256 * 256;
1389 10 return $no;
1390 }
1391  
1392 sub name2ip {
1393 20 ▶ my $obj = shift(@_);
Subroutine name2ip: called CC=5 SCAR=20.9
Pod undocumented
1394 20 my $host = shift(@_);
1395 20 my $ip_address = "";
1396 20 ▶ if (($host =~ m/^$IPv4_re$/) || ($host =~ m/^$IPv6_re$/) || ($host =~ m/^\:\:$/)) {
Branch: 1 branch
BranchTrueFalseTotal
if ($host =~ /^$IPv4_re$/ or $host =~ /^$IPv6_re$/ or $host =~ /^\:\:$/) { } 20 0 20
Condition50%3/6
$host =~ /^$IPv4_re$/ or $host =~ /^$IPv6_re$/ or $host =~ /^\:\:$/
l!l&&r!l&&!r
2000
$host =~ /^$IPv4_re$/ or $host =~ /^$IPv6_re$/
l!l&&r!l&&!r
10100
MC/DC0%0/3
$host =~ /^$IPv4_re$/ or $host =~ /^$IPv6_re$/ or $host =~ /^\:\:$/
$host =~ /^$IPv4_re$/ $host =~ /^$IPv6_re$/ $host =~ /^\:\:$/
Truth table50%2/4
A or B or C
A= $host =~ /^$IPv4_re$/B= $host =~ /^$IPv6_re$/C= $host =~ /^\:\:$/
ABCresult
1XX1
01X1
0011
0000
1397 20 $ip_address = $host;
1398 } else {
1399 # TO_DO: Can we return IPv6 address too?
1400 0 my @hostname = gethostbyname($host);
1401 0 ▶ if ($#hostname < 4) {
Branch: 1 branch
BranchTrueFalseTotal
if ($#hostname < {sign => '+', value => ['4']}) { } 0 0 0
1402 0 $ip_address = $host;
1403 } else {
1404 0 $ip_address = join('.', unpack('C4', $hostname[4]));
1405 }
1406 }
1407 20 return $ip_address;
1408 }
1409  
1410 sub ip_is_ipv4 {
1411 20 ▶ my $obj = shift(@_);
Subroutine ip_is_ipv4: called CC=5 SCAR=16.5
Pod undocumented
1412 20 my $ip = shift(@_);
1413 20 ▶ if ($ip =~ m/^$IPv4_re$/) {
Branch: 1 branch
BranchTrueFalseTotal
if ($ip =~ /^$IPv4_re$/) { } 10 10 20
1414 10 my @octet = split(/\./, $ip);
1415 10 foreach my $i (0 .. $#octet) {
1416 40 ▶ return 0 if (($octet[$i] > 255) || ($octet[$i] < 0));
Branch: 1 branch
BranchTrueFalseTotal
if $octet[$i] > bless( {"sign" => "+","value" => bless( [255], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) or $octet[$i] < bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) 0 40 40
Condition33%1/3
$octet[$i] > bless( {"sign" => "+","value" => bless( [255], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) or $octet[$i] < bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
l!l&&r!l&&!r
0040
MC/DC0%0/2
$octet[$i] > bless( {"sign" => "+","value" => bless( [255], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) or $octet[$i] < bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
$octet[$i] > bless( {"sign" => "+","value" => bless( [255], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) $octet[$i] < bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
Truth table33%1/3
A or B
A= $octet[$i] > bless( {"sign" => "+","value" => bless( [255], 'Math::BigInt::Calc' )}, 'Math::BigInt' )B= $octet[$i] < bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
ABresult
1X1
011
000
1417 }
1418 10 return 1;
1419 } else {
1420 10 return 0;
1421 }
1422 }
1423  
1424 sub ip_is_ipv6 {
1425 10 ▶ my $obj = shift(@_);
Subroutine ip_is_ipv6: called CC=4 SCAR=17.2
Pod undocumented
1426 10 my $ip = shift(@_);
1427 10 ▶ if (($ip =~ m/^$IPv6_re$/) || ($ip =~ m/^$IPv4_re$/) || ($ip =~ m/^\:\:$/)) {
Branch: 1 branch
BranchTrueFalseTotal
if ($ip =~ /^$IPv6_re$/ or $ip =~ /^$IPv4_re$/ or $ip =~ /^\:\:$/) { } 10 0 10
Condition33%2/6
$ip =~ /^$IPv6_re$/ or $ip =~ /^$IPv4_re$/ or $ip =~ /^\:\:$/
l!l&&r!l&&!r
1000
$ip =~ /^$IPv6_re$/ or $ip =~ /^$IPv4_re$/
l!l&&r!l&&!r
1000
MC/DC0%0/3
$ip =~ /^$IPv6_re$/ or $ip =~ /^$IPv4_re$/ or $ip =~ /^\:\:$/
$ip =~ /^$IPv6_re$/ $ip =~ /^$IPv4_re$/ $ip =~ /^\:\:$/
Truth table25%1/4
A or B or C
A= $ip =~ /^$IPv6_re$/B= $ip =~ /^$IPv4_re$/C= $ip =~ /^\:\:$/
ABCresult
1XX1
01X1
0011
0000
1428 10 return 1;
1429 } else {
1430 0 return 0;
1431 }
1432 }
1433  
1434 3 1;
1435 __END__
↑ Summary