Branch Coverage

blib/lib/GeoHash.pm
Criterion Covered Total %
branch 17 30 56.6


line true false branch
12 0 9 if (my $backend = $ENV{'PERL_GEOHASH_BACKEND'})
13 0 0 if ($backend eq 'Geo::Hash') { }
0 0 elsif ($backend eq '+Geo::Hash') { }
26 0 18 if $class eq 'GeoHash::backendPP'
28 9 9 unless $@
30 0 9 if $@
69 2 221 if (length($geohash || '') < 2)
74 7 214 if ($last_char eq $ENC[0]) { }
7 207 elsif ($last_char eq $ENC[-1]) { }
79 6 1 if (scalar keys %{$$self{'cache'}{$parent_geohash};} == scalar @ENC) { }
87 199 8 if ($$self{'cache'}{$parent_geohash} and $ENC_MAP{$last_char}) { }
118 4 2 if $geohash
153 0 0 unless $hash_len >= 1
160 0 0 if ($hash_len == 1) { }
166 0 0 if ($BORDERS[$where][$type] =~ /$last_char/)