X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=Geocoding%2FResult.pm;h=4598441f95e21d9caf1e70f206dcd6fe006d2d60;hb=5f18e6b0183ba449aeb80c1b53d45344ab5fdb46;hp=e0e271a397f0c04df7e4e3e9eeefe9c731de5331;hpb=c16e8ca7ab01db1321d407a8eba212440b0c97c9;p=Geo-USCensus-Geocoding.git diff --git a/Geocoding/Result.pm b/Geocoding/Result.pm index e0e271a..4598441 100644 --- a/Geocoding/Result.pm +++ b/Geocoding/Result.pm @@ -2,18 +2,20 @@ package Geo::USCensus::Geocoding::Result; use Moo; # just for attribute declaration -has 'is_match' => ( is => 'rw', default => 0 ); -has [ 'content', - 'match_level', - 'address', - 'state', - 'county', - 'tract', - 'block', - 'error_message', - 'latitude', - 'longitude' - ] => ( is => 'rw', default => '' ); +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;