Branch Coverage

blib/lib/Geohash.pm
Criterion Covered Total %
branch 22 32 68.7


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 9 9 if $class eq 'Geohash::backendPP'
28 0 9 unless $@
30 0 9 unless ($class eq 'Geohash::backendPP')
31 0 0 if $@
71 2 221 if (length($geohash || '') < 2)
76 7 214 if ($last_char eq $ENC[0]) { }
7 207 elsif ($last_char eq $ENC[-1]) { }
81 6 1 if (scalar keys %{$$self{'cache'}{$parent_geohash};} == scalar @ENC) { }
89 199 8 if ($$self{'cache'}{$parent_geohash} and $ENC_MAP{$last_char}) { }
120 4 2 if $geohash
155 0 83 unless $hash_len >= 1
162 4 79 if ($hash_len == 1) { }
168 13 66 if ($BORDERS[$where][$type] =~ /$last_char/)