Branch Coverage

File:blib/lib/Geo/Coder/Free/Utils.pm
Coverage:66.1%

line%coveragebranch
139100TFunless $config
148100TFunless (defined $driver)
15050TFif ($logger)
156100TFunless (_is_driver_available($driver))
15850TFif ($logger)
1730TFif $logger
181100TFunless exists $config->{$cache_type}
184100TFunless ref $cache_config eq "HASH"
18850TFif (exists $cache_config->{'driver'})
192100TFunless grep {$_ eq $driver;} @valid_drivers
197100TFunless exists $cache_config->{$param}
199100TFunless defined $value and $value =~ /^\d+$/u and $value > 0
204100TFif (exists $cache_config->{'port'})
20650TFunless $port >= 1 and $port <= 65535
21150TFif (exists $cache_config->{'datastore'} and exists $cache_config->{'global'} and my $driver = $cache_config->{'driver'})
22050TFif $ENV{$env_var}
223100TF$cache_type eq 'disc_cache' ? :
22750TF$cache_type eq 'disc_cache' ? :
231100TFif $driver =~ /^(Memory|Null)$/u
24250TFunless exists $driver_modules{$driver}
244100TFif ($driver_modules{$driver}->can("new"))
253100TFif ($@)
26750TFif ($logger and $logger->can('error')) { }
27650TFif ($driver eq 'Redis') { }
50TFelsif ($driver eq 'DBI') { }
50TFelsif ($driver eq 'SharedMem') { }
100TFelsif ($driver eq 'Memory') { }
50TFelsif ($driver eq 'Memcached') { }
100TFelsif (not $driver =~ /^(Null)$/u) { }
2960TFif (@servers)
3060TFunless $config->{'redis_options'}
3120TFunless $connect_string
3230TFif $logger
34150TFif (exists $config->{'global'}) { }
3500TFif (@servers) { }
3550TFif $logger
362100TFunless $root_dir
363100TFunless -d $root_dir and -w $root_dir
3720TFunless $server_config
3790TFunless ($server_entry =~ /:/u)
3850TFif ($server_entry =~ /^([a-zA-Z0-9.-]+):(\d+)$/u) { }
3870TFunless $port > 0 and $port <= 65535
3890TFif $logger
418100TFunless defined $$coord
419100TFunless &looks_like_number($$coord)
423100TFif abs $lat1 > 90 or abs $lat2 > 90
425100TFif abs $lon1 > 180 or abs $lon2 > 180
429100TFif $lat1 == $lat2 and $lon1 == $lon2
433100TFunless $unit =~ /^[KNM]$/u
437100TF$unit eq 'N' ? :
100TF$unit eq 'K' ? :
470100TFif (@words >= 3) { }
100TFelsif (@words == 2) { }
472100TFif (lc $words[-2] ne 'cross' and $a = $abbreviations->abbreviate($words[-2])) { }
100TFelsif ($a = $abbreviations->abbreviate($words[-1])) { }
479100TFif (my $a = $abbreviations->abbreviate($words[-1]))