Branch Coverage

blib/lib/Geo/Coordinates/OSGB/Grid.pm
Criterion Covered Total %
branch 75 96 78.1


line true false branch
50 7 1 if ($s =~ /\A\d+\Z/imosx)
55 2 0 if (@preferred_sheets) { }
70 2 0 if _winding_number($easting, $northing, $map->{'polygon'})
78 76 137 exists $options->{'form'} ? :
79 60 153 exists $options->{'maps'} ? :
80 8 205 exists $options->{'series'} ? :
83 0 213 unless ($sq)
90 59 154 if ($with_maps)
92 5705 61142 if index($map_keys, substr($k, 0, 1)) == -1
93 208 3769 if ($m->{'bbox'}[0][0] <= $easting and $easting < $m->{'bbox'}[1][0] and $m->{'bbox'}[0][1] <= $northing and $northing < $m->{'bbox'}[1][1])
96 199 9 if ($w != 0)
105 2 211 if ($form eq 'TRAD') { }
48 163 elsif ($form eq 'GPS') { }
1 162 elsif ($form eq 'SS') { }
115 212 0 if (my($space_a, $e_spec, $space_b, $n_spec) = $form =~ / \A S{1,2}(\s*)(E{1,5})(\s*)(N{1,5}) \Z /imosx)
121 49 163 if (wantarray)
128 12 151 if ($with_maps) { }
129 12 0 if (@sheets) { }
156 2 10 if (defined $options) { }
174 3 1 if wantarray
176 0 1 unless (@sheets)
177 1 0 if (@sheets == 1)
178 0 0 if (@sheets == 2)
190 0 213 unless 0 <= $e and $e < 2500000 and 0 <= $n and $n < 2500000
203 0 117 if length $s < 2
206 8 109 if 0 > $a
209 54 55 if 0 > $b
225 0 112 if $len == 0
226 0 112 if $len % 2
227 0 112 if $len > 10
237 42 75 'HASH' eq ref $_[-1] ? :
239 42 75 exists $options->{'figs'} ? :
243 62 55 @_ < 3 ? :
246 55 62 if (my($E, $N) = _get_grid_square_offsets($s))
247 53 2 length $s > 2 ? :
249 37 18 wantarray ? :
256 62 0 if (defined $sheet)
258 8 54 unless (defined $prefix)
261 61 1 unless (defined $suffix)
266 62 0 if (exists $Geo::Coordinates::OSGB::Grid::maps{$sheet})
269 59 3 if (defined $numbers)
275 0 59 if ($w == 0)
279 49 13 wantarray ? :
284 0 0 if (@out = $s =~ /\A (\d+(?:\.\d+)?) \s+ (\d+(?:\.\d+)?) \Z/imosx)
285 0 0 wantarray ? :
307 1829 2357 if ($poly->[$i][1] <= $y) { }
308 266 1563 if ($$poly[$i + 1][1] > $y and _is_left($x, $y, $poly->[$i], $$poly[$i + 1]) > 0)
313 6 2351 if ($$poly[$i + 1][1] <= $y and _is_left($x, $y, $poly->[$i], $$poly[$i + 1]) < 0)