logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

MaxMind::DB::Writer - DEPRECATED Create MaxMind DB database files

Authors

       •   Olaf Alders <oalders@maxmind.com>

       •   Greg Oschwald <goschwald@maxmind.com>

       •   Dave Rolsky <drolsky@maxmind.com>

       •   Mark Fowler <mfowler@maxmind.com>

Contributors

       •   Colin Watson <cjwatson@debian.org>

       •   Florian Ragwitz <rafl@debian.org>

       •   Ilya Melamed <ilya77@gmail.com>

       •   Jan Bieron <jbieron+github@gmail.com>

       •   José Joaquín Atria <jjatria@gmail.com>

       •   Mark R <github@mark.org.il>

       •   Narsimham Chelluri <nchelluri@users.noreply.github.com>

       •   Nick Logan <nlogan@maxmind.com>

       •   Thomas J Mather <tjmather@maxmind.com>

       •   William Storey <wstorey@maxmind.com>

Deprecated

       This code is no longer maintained. We recommend using the Go mmdbwriter package
       <https://github.com/maxmind/mmdbwriter> to write MMDB files.

Description

       This distribution contains the code necessary to write MaxMind DB database files
       <http://maxmind.github.io/MaxMind-DB/>. See MaxMind::DB::Writer::Tree for API docs.

Mac Os X Support

       If you're running into install errors under Mac OS X, you may need to force a build of the 64 bit binary.
       For example, if you're installing via "cpanm":

           ARCHFLAGS="-arch x86_64" cpanm MaxMind::DB::Writer

Name

       MaxMind::DB::Writer - DEPRECATED Create MaxMind DB database files

Support

       Please report all issues with this code using the GitHub issue tracker at
       <https://github.com/maxmind/MaxMind-DB-Writer-perl/issues>.

       We welcome patches as pull requests against our GitHub repository at
       <https://github.com/maxmind/MaxMind-DB-Writer-perl>.

       Bugs may be submitted through <https://github.com/maxmind/MaxMind-DB-Writer-perl/issues>.

Synopsis

           use MaxMind::DB::Writer::Tree;

           my %types = (
               color => 'utf8_string',
               dogs  => [ 'array', 'utf8_string' ],
               size  => 'uint16',
           );

           my $tree = MaxMind::DB::Writer::Tree->new(
               ip_version            => 6,
               record_size           => 24,
               database_type         => 'My-IP-Data',
               languages             => ['en'],
               description           => { en => 'My database of IP data' },
               map_key_type_callback => sub { $types{ $_[0] } },
           );

           $tree->insert_network(
               '8.8.8.0/24',
               {
                   color => 'blue',
                   dogs  => [ 'Fido', 'Ms. Pretty Paws' ],
                   size  => 42,
               },
           );

           open my $fh, '>:raw', '/path/to/my-ip-data.mmdb';
           $tree->write_tree($fh);

Version

       version 0.300004

Windows Support

       This distribution does not currently work on Windows. Reasonable patches for Windows support are very
       welcome. You will probably need to start by making Math::Int128 work on Windows, since we use that
       module's C API for dealing with 128-bit integers to represent IPv6 addresses numerically.

See Also