Geo/Electorates.pm untested

filter: Statementstmt 0.0% 0 / 17 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 4 Podpod 0.0% 0 / 2 totaltotal 0.0% 0 / 25 CC 2 SCAR 12.8
CC
2
Cov
0%
point_in_polygon
6.0
house_id
2.0
BEGIN
2.0
CRAP 3.6
1 package Politics::AU::Geo::Electorates;
2  
3 use strict;
4 use Politics::AU::Geo::Polygons;
5  
6 our $VERSION = '0.01';
7  
8 sub house_id {
9 my $self = shift;
10 join( '.', $self->state, $self->level, $self->house );
11 }
12  
13 sub point_in_polygon {
14 my $self = shift;
15 my $latitude = shift;
16 my $longitude = shift;
17  
18 # Load the polygon
19 my @polygon = Politics::AU::Geo::Polygons->select(
20 'where eid = ?', $self->eid,
21 );
22 unless ( @polygon ) {
23 die("Failed to find polygon for electorate");
24 }
25  
26 $polygon[0]->point_in_polygon( $latitude, $longitude );
27 }
28  
29 1;
30  
31 __END__