libemail-mime-perl\
libexcel-writer-xlsx-perl\
libgd-graph3d-perl\
- libgeo-coder-googlev3-perl\
libgeo-coder-osm-perl\
liblocale-maketext-lexicon-perl\
liblog-log4perl-perl\
serve-cgi-bin
export CPAN_MODULES = \
- Geo::Coder::Free \
+ Geo::Coder::Google \
Business::OnlinePayment::PayPal \
Email::Send
libemail-mime-perl\
libexcel-writer-xlsx-perl\
libgd-graph3d-perl\
- libgeo-coder-googlev3-perl\
libgeo-coder-osm-perl\
liblocale-maketext-lexicon-perl\
liblog-log4perl-perl\
serve-cgi-bin
export CPAN_MODULES = \
- Geo::Coder::Free \
+ Geo::Coder::Google \
Business::OnlinePayment::PayPal \
Email::Send
libemail-mime-perl\
libexcel-writer-xlsx-perl\
libgd-graph3d-perl\
- libgeo-coder-googlev3-perl\
libgeo-coder-osm-perl\
liblocale-maketext-lexicon-perl\
liblog-log4perl-perl\
serve-cgi-bin
export CPAN_MODULES = \
- Geo::Coder::Free \
+ Geo::Coder::Google \
Business::OnlinePayment::PayPal \
Email::Send
libemail-mime-perl\
libexcel-writer-xlsx-perl\
libgd-graph3d-perl\
- libgeo-coder-googlev3-perl\
libgeo-coder-osm-perl\
liblocale-maketext-lexicon-perl\
liblog-log4perl-perl\
serve-cgi-bin
export CPAN_MODULES = \
- Geo::Coder::Free \
+ Geo::Coder::Google \
Business::OnlinePayment::PayPal \
Email::Send \
MARC::Charset \
libemail-mime-perl\
libexcel-writer-xlsx-perl\
libgd-graph3d-perl\
- libgeo-coder-googlev3-perl\
libgeo-coder-osm-perl\
liblocale-maketext-lexicon-perl\
liblog-log4perl-perl\
serve-cgi-bin
export CPAN_MODULES = \
- Geo::Coder::Free \
+ Geo::Coder::Google \
Business::OnlinePayment::PayPal \
Email::Send \
MARC::Charset \
use OpenSRF::Utils::Logger qw/$logger/;
-use Geo::Coder::Free;
+my $have_geocoder_free = eval {
+ require Geo::Coder::Free;
+ Geo::Coder::Free->import();
+ 1;
+};
use Geo::Coder::OSM;
use Geo::Coder::Google;
my $geo_coder;
eval {
if ($service->service_code eq 'Free') {
- $logger->debug("Using Geo::Coder::Free (service id $service_id)");
- $geo_coder = Geo::Coder::Free->new();
+ if ($have_geocoder_free) {
+ $logger->debug("Using Geo::Coder::Free (service id $service_id)");
+ $geo_coder = Geo::Coder::Free->new();
+ } else {
+ $logger->error("geosort: Geo::Coder::Free not installed but referenced.");
+ return OpenILS::Event->new('GEOCODING_LOCATION_NOT_FOUND');
+ }
} elsif ($service->service_code eq 'Google') {
$logger->debug("Using Geo::Coder::Google (service id $service_id)");
$geo_coder = Geo::Coder::Google->new(key => $service->api_key);