4 ms·
This might not be a common experience nowadays (sigh), but I encountered this problem a few weeks ago in Perl. The long-used module at https://metacpan.org/pod/
by kwoff 7y ago
This might not be a common experience nowadays (sigh), but I encountered this problem a few weeks ago in Perl. The long-used module at https://metacpan.org/pod/Geo::IP https://metacpan.org/pod/Geo::IP now mentions "the GeoIP Legacy file based database" and has a link to http://dev.maxmind.com/geoip/geolite http://dev.maxmind.com/geoip/geolite which actually redirects to https://dev.maxmind.com/geoip/geoip2/geolite2/ https://dev.maxmind.com/geoip/geoip2/geolite2/ . Interestingly, now that I look there again, it no longer refers (at the top of the page) to the January 2019 deprecation of the version 1 database, but now to "making significant changes to how you access free GeoLite2 databases starting December 30, 2019". (I now have to also review that for my workplace...)
Anyway, the new CPAN modules are under https://metacpan.org/pod/GeoIP2 https://metacpan.org/pod/GeoIP2 and can be confusing. One confusing thing: despite a prominent Perl developer such as Dave Rolsky working (still?) at MaxMind, it says that the "module is deprecated and will only receive fixes for major bugs and security vulnerabilities".
For porting purposes, please note that the module you want to use is https://metacpan.org/pod/GeoIP2::Database::Reader https://metacpan.org/pod/GeoIP2::Database::Reader . (They also mention https://metacpan.org/pod/MaxMind::DB::Reader https://metacpan.org/pod/MaxMind::DB::Reader which can makes things unclear...) I didn't see any other info on the github page about Perl support. Also the interface is definitely more tedious and object-oriented in the worst way. I'm sure there are good reasons... And in my experience it's much slower if you use the pure-Perl interface (this is something you should read the MaxMind::DB::Reader perldoc for: it mentions installing a C library in "PURE PERL VERSUS XS").
Good luck