MaxMin...etadata(3pm)
π MaxMind::DB::Metadata π
okay bestie so this page is MaxMin...etadata(3pm) β that's MaxMind::DB::Metadata, living in section 3pm of the User Contributed Perl Documentation. it's giving "let me tell you about your database's vibes" and honestly? iconic. π
β¨ VERSION β¨
version 0.040001 β yes we're on the 0.040001 era, slay π«Ά
πΈ SYNOPSIS πΈ
here's the whole moment in action:
my $reader = MaxMind::DB::Reader->new( file => $path );
my $metadata = $reader->metadata();
print $metadata->description()->{en};
like. you grab a reader, you ask it for its metadata, you print the English description. that's it. main character behavior fr fr π
π¦ DESCRIPTION π¦
so this class is the whole API for representing the metadata of a MaxMind DB database. every little fact your database knows about itself? it lives here. β¨
and if you want the official format spec, the canonical lore is at http://maxmind.github.io/MaxMind-DB/ β go read it, iykyk π
π API π
this class hands you one method for each metadata attribute in a database. one per attribute, no crumbs left, we love a complete set π
π« $metadata->binary_format_major_version()
returns the binary format major version number.
π« $metadata->binary_format_minor_version()
returns the binary format minor version number.
π« $metadata->build_epoch()
returns the database's build timestamp as an epoch value. it's a number bestie, not a cute little date string, just raw epoch π°οΈ
π« $metadata->database_type()
returns a string that tells you the database's type. yes it's a string. no it's not a vibe, it's a type. π
π« $metadata->languages()
returns an arrayref of locale codes showing what languages this database actually has info for. multilingual queen π
π« $metadata->description()
returns a hashref of descriptions. the keys should be locale codes like "en" or "pt-BR", and the values are the description in that language. so like, keys = languages, values = the actual words. obsessed π
π« $metadata->ip_version()
returns a 4 or a 6 β that's telling you what type of IP addresses this database can look up for you. only ever those two numbers, no in-between π
π« $metadata->node_count()
returns the number of nodes in the database's search tree. that's a lot of nodes, hope she's hydrated π³
π« $metadata->record_size()
returns the record size for nodes in the database's search tree. the nodes got sizes, and now you know them β¨
π AUTHORS π
the geniuses behind this, periodt:
- Dave Rolsky <drolsky@maxmind.com>
- Olaf Alders <oalders@maxmind.com>
π COPYRIGHT AND LICENSE π
This software is Copyright (c) 2016 by MaxMind, Inc..
This is free software, licensed under:
The Artistic License 2.0 (GPL Compatible)
bestie this is literally free software, go wild, but respect the license okay? π«Ά
and that's the whole page!! this was perl v5.32.0, dated 2021-01-05, from MaxMin...etadata(3pm) β thanks for coming to my ted talk, mwah πβ¨π¦
π¦ where this page comes from
- debian bookworm: libmaxmind-db-common-perl 0.040001-1.1 Β· Artistic-2.0
- debian trixie: libmaxmind-db-common-perl 0.040001-1.1 Β· Artistic-2.0
- ubuntu jammy: libmaxmind-db-common-perl 0.040001-1.1 Β· Artistic-2.0
- ubuntu noble: libmaxmind-db-common-perl 0.040001-1.1 Β· Artistic-2.0
- ubuntu resolute: libmaxmind-db-common-perl 0.040001-1.1 Β· Artistic-2.0
- ubuntu stonking: libmaxmind-db-common-perl 0.040001-1.1 Β· Artistic-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms