summaryrefslogtreecommitdiff
path: root/Geocoding.pm
diff options
context:
space:
mode:
Diffstat (limited to 'Geocoding.pm')
-rw-r--r--Geocoding.pm9
1 files changed, 6 insertions, 3 deletions
diff --git a/Geocoding.pm b/Geocoding.pm
index c64c590..a7e5ba1 100644
--- a/Geocoding.pm
+++ b/Geocoding.pm
@@ -19,7 +19,7 @@ Version 0.01
=cut
our $VERSION = '0.01';
-our $DEBUG = 1;
+our $DEBUG = 0;
=head1 SYNOPSIS
@@ -34,6 +34,8 @@ our $DEBUG = 1;
# optional fields
benchmark => 'Public_AR_ACS2013', # default is "Public_AR_Current"
vintage => 'Census2010_ACS2013', # default is "Current_Current"
+
+ debug => 1, # will print the URL and some other info
};
my $result = Geo::USCensus::Geocoding->query($request);
@@ -62,8 +64,8 @@ my $api_uri = 'http://geocoding.geo.census.gov/geocoder/geographies/address';
sub query {
my $class = shift;
my %opt = (
- benchmark => 'Public_AR_Current',
- vintage => 'Current_Current',
+ benchmark => 'Public_AR_Census2010',
+ vintage => 'Census2010_Census2010',
);
if (ref $_[0] eq 'HASH') {
%opt = (%opt, %{ $_[0] });
@@ -71,6 +73,7 @@ sub query {
%opt = (%opt, @_);
}
+ $DEBUG = $opt{debug} || 0;
$opt{format} = 'json';
foreach (qw(street city state zip)) {