X-Git-Url: http://git.freeside.biz/gitweb/?p=Geo-USCensus-Geocoding.git;a=blobdiff_plain;f=Geocoding.pm;fp=Geocoding.pm;h=a7e5ba124a2ab9020285143b776dc96edd4b043f;hp=c64c5902ca5f06f7e62c80642dfc83beb5872544;hb=83646ffc2d229a706bdf3f90bf3cc8834c03106f;hpb=2abefcaec0a7fbc3f320e0c251de81144ca6bd93 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)) {