From bc220e82a2a8da2f299dfa8365979fab048e903a Mon Sep 17 00:00:00 2001 From: Nigel Horne Date: Thu, 28 Mar 2024 15:18:26 -0400 Subject: [PATCH] Fix -v option to bin/address_lookup --- bin/address_lookup | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/address_lookup b/bin/address_lookup index f969a2b7..99a04748 100755 --- a/bin/address_lookup +++ b/bin/address_lookup @@ -19,17 +19,17 @@ if(scalar(@ARGV) == 0) { my %opts; getopts('v', \%opts); -Geo::Coder::Free::DB::init(logger => MyLogger->new()) if($opts{'v'}); +Database::Abstraction::init(logger => MyLogger->new()) if($opts{'v'}); # print join(' ', @ARGV), "\n"; if(my $rc = Geo::Coder::Free::Local::geocode(join(' ', @ARGV))) { print 'Local: ', Data::Dumper->new([$rc])->Dump(); } elsif($rc = Geo::Coder::Free::geocode(join(' ', @ARGV))) { -# if(my $rc = Geo::Coder::Free::geocode(join(' ', @ARGV))) { print Data::Dumper->new([$rc])->Dump(); } elsif($ENV{'OPENADDR_HOME'} && ($rc = Geo::Coder::Free::OpenAddresses->new(openaddr => $ENV{'OPENADDR_HOME'})->geocode(location => join(' ', @ARGV)))) { print Data::Dumper->new([$rc])->Dump(); } else { + print STDERR join(' ', @ARGV), ": not found\n" if($opts{'v'}); exit(1); }