/
Depends on
- libmath-bigint-perl (libmath-bigint-perl)
- libmaxminddb (libmaxminddb-dev)
- libtest-simple-perl (libtest-simple-perl)
- perl (perl, perl-xs-dev)
- pkgconf (pkgconf)
- dbip-asn-lite, dbip-country-lite, debhelper-compat
README (full)
IP::Geolocation::MMDB
A Perl module that reads MaxMind DB files and maps IP addresses to location information such as country and city names.
use IP::Geolocation::MMDB;
my $db = IP::Geolocation::MMDB->new(file => '/path/to/Country.mmdb');
my $metadata = $db->metadata;
my $data = $db->get('1.2.3.4');
my $country_code = $db->getcc('2620:fe::9');
DEPENDENCIES
Requires Math::BigInt version 1.999806, which is distributed with Perl 5.26 and newer. Requires libmaxminddb 1.2.0 or newer.
Requires a database in the MaxMind DB file format from MaxMind or DP-IP.com.
Alien::libmaxminddb from CPAN is a build dependency. The built module does only depend on modules that are distributed with Perl.
Install pkg-config and libmaxminddb-devel or libmaxminddb-dev if you would like to use your operating system's libmaxminddb library.
INSTALLATION
Run the following commands to install the software:
perl Makefile.PL
make
make test
make install
Type the following command to see the module usage information:
perldoc IP::Geolocation::MMDB
LICENSE AND COPYRIGHT
Copyright (C) 2025 Andreas Vögele
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
| dir | debian/ |
| dir | lib/ |
| dir | t/ |
| file | CONTRIBUTING.md |
| file | Changes |
| file | LICENSE |
| file | MANIFEST |
| file | MANIFEST.SKIP |
| file | META.json |
| file | META.yml |
| file | MMDB.xs |
| file | Makefile.PL |
| file | README.md |
| file | cpanfile |
| file | dist.ini |
| file | typemap |