Philip Prindeville wrote:
What are other people doing now that MaxMind has deprecated Perl support for
their databases?
I'm the author of IP:Geolocation::MMDB, which is an API-compatible
replacement for MaxMind::DB::Reader. Packages are in Fedora, in SUSE's
devel:languages:perl repository and hopefully soon in Debian.
I created the file MaxMind/DB/Reader.pm in my @INC path, which creates a
subclass named MaxMind::DB::Reader. I've been using this work around for
months with SpamAssassin:
use IP::Geolocation::MMDB;
@MaxMind::DB::Reader::ISA = qw(IP::Geolocation::MMDB);
1;
Patching GeoDB.pm is also trivial:
--- a/lib/Mail/SpamAssassin/GeoDB.pm
+++ b/lib/Mail/SpamAssassin/GeoDB.pm
@@ -218,4 +218,7 @@ sub load_geoip2 {
eval {
require MaxMind::DB::Reader;
+ } or eval {
+ require IP::Geolocation::MMDB;
+ @MaxMind::DB::Reader::ISA = qw(IP::Geolocation::MMDB);
} or do {
my $err = $@;
SpamAssassin's test suite requires more work. IP:Geolocation::MMDB works
with Perl 5.16 and above. I'm struggling with SpamAssassin's tests on
Windows though. IP::Geolocation::MMDB is an XS module and most Perl
releases for Windows before 5.34 have issues with linker library paths
and libraries that are linked in the wrong order. I am also going to
release a new version of Alien::libmaxminddb, which doesn't depend on
Alien::Build.