From 83646ffc2d229a706bdf3f90bf3cc8834c03106f Mon Sep 17 00:00:00 2001 From: Mark Wells Date: Sun, 30 Nov 2014 13:01:27 -0800 Subject: adjustments --- Geocoding.pm | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'Geocoding.pm') 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)) { -- cgit v1.2.1