Branch Coverage

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

line%coveragebranch
140100TFunless $config
149100TFunless (defined $driver)
15150TFif ($logger)
157100TFunless (_is_driver_available($driver))
15950TFif ($logger)
1740TFif $logger
182100TFunless exists $config->{$cache_type}
185100TFunless ref $cache_config eq "HASH"
18950TFif (exists $cache_config->{'driver'})
193100TFunless grep {$_ eq $driver;} @valid_drivers
198100TFunless exists $cache_config->{$param}
200100TFunless defined $value and $value =~ /^\d+$/u and $value > 0
205100TFif (exists $cache_config->{'port'})
20750TFunless $port >= 1 and $port <= 65535
21250TFif (exists $cache_config->{'datastore'} and exists $cache_config->{'global'} and my $driver = $cache_config->{'driver'})
22150TFif $ENV{$env_var}
224100TF$cache_type eq 'disc_cache' ? :
22850TF$cache_type eq 'disc_cache' ? :
232100TFif $driver =~ /^(Memory|Null)$/u
24350TFunless exists $driver_modules{$driver}
245100TFif ($driver_modules{$driver}->can("new"))
254100TFif ($@)
26850TFif ($logger and $logger->can('error')) { }
27750TFif ($driver eq 'Redis') { }
50TFelsif ($driver eq 'DBI') { }
50TFelsif ($driver eq 'SharedMem') { }
100TFelsif ($driver eq 'Memory') { }
50TFelsif ($driver eq 'Memcached') { }
100TFelsif (not $driver =~ /^(Null)$/u) { }
2970TFif (@servers)
3070TFunless $config->{'redis_options'}
3130TFunless $connect_string
3240TFif $logger
34250TFif (exists $config->{'global'}) { }
3510TFif (@servers) { }
3560TFif $logger
363100TFunless $root_dir
364100TFunless -d $root_dir and -w $root_dir
3730TFunless $server_config
3800TFunless ($server_entry =~ /:/u)
3860TFif ($server_entry =~ /^([a-zA-Z0-9.-]+):(\d+)$/u) { }
3880TFunless $port > 0 and $port <= 65535
3900TFif $logger
419100TFunless defined $$coord
420100TFunless &looks_like_number($$coord)
424100TFif abs $lat1 > 90 or abs $lat2 > 90
426100TFif abs $lon1 > 180 or abs $lon2 > 180
430100TFif $lat1 == $lat2 and $lon1 == $lon2
434100TFunless $unit =~ /^[KNM]$/u
438100TF$unit eq 'N' ? :
100TF$unit eq 'K' ? :
471100TFif (@words >= 3) { }
100TFelsif (@words == 2) { }
473100TFif (lc $words[-2] ne 'cross' and $a = $abbreviations->abbreviate($words[-2])) { }
100TFelsif ($a = $abbreviations->abbreviate($words[-1])) { }
480100TFif (my $a = $abbreviations->abbreviate($words[-1]))