summaryrefslogtreecommitdiff
path: root/Geocoding/Result.pm
blob: 4598441f95e21d9caf1e70f206dcd6fe006d2d60 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
package Geo::USCensus::Geocoding::Result;

use Moo; # just for attribute declaration

has 'is_match' => ( is => 'rw', default => sub { 0 } );
foreach ( 'content',
          'match_level',
          'address',
          'state',
          'county',
          'tract',
          'block',
          'error_message',
          'latitude',
          'longitude'
        ) {
  has $_ => ( is => 'rw', default => sub { '' } );
}

sub censustract {
  my $self = shift;
  return join('', $self->state, $self->county, $self->tract);
}

1;