Branch Coverage

blib/lib/Geo/IPinfo.pm
Criterion Covered Total %
branch 35 88 39.7


line true false branch
1062 0 1 defined $token ? :
1077 0 1 defined $options{'timeout'} ? :
1085 0 1 exists $options{'countries'} ? :
1089 0 1 exists $options{'eu_countries'} ? :
1093 0 1 exists $options{'countries_flags'} ? :
1097 0 1 exists $options{'countries_currencies'} ? :
1101 0 1 exists $options{'continents'} ? :
1142 0 0 defined $ip ? :
1144 0 0 if ($ip eq "")
1150 0 0 unless (defined $validated_ip)
1158 0 0 if (defined $cached_info)
1166 0 0 if ($response->is_success)
1170 0 0 if ($content_type =~ m[application/json]i) { }
1172 0 0 if ($@)
1188 0 0 if ($response->code == 429)
1202 0 0 unless (defined $field)
1207 0 0 unless (defined $valid_fields{$field})
1229 2 0 defined $ip ? :
1230 2 0 defined $field ? :
1232 2 0 if ($ip ne "")
1234 0 2 unless (defined $validated_ip)
1242 1 1 if eval { do { $info->isa("Geo::Details") } }
1244 0 1 if ($field ne "" and ref $info eq "HASH")
1245 0 0 if (exists $info->{'bogon'})
1251 1 0 defined $info ? :
1258 2 0 if ($ip ne "")
1259 0 2 if (_is_bogon($ip))
1270 1 1 if (defined $cached_info)
1275 0 1 unless (defined $source_info)
1279 0 1 if (ref $source_info eq "")
1284 1 0 if (defined $country)
1292 0 1 if (grep {$_ eq $country;} @{$$self{'eu_countries'};}) { }
1300 1 0 if (defined $source_info->{'loc'})
1316 1 1 if (defined $cached_info)
1318 1 0 if ($timedelta <= $cache_ttl or $custom_cache == 1)
1332 0 1 if ($is_ipv6) { }
1340 1 0 if ($response->is_success)
1345 1 0 if ($content_type =~ m[application/json]i) { }
1347 0 1 if ($@)
1358 0 0 if ($response->code == 429)
1368 0 1 if (defined $options{'cache'})
1375 0 1 if (defined $options{'cache_ttl'})
1382 0 1 defined $options{'cache_max_size'} ? :
1426 0 2 if ($ip =~ /:/) { }