MaxMin...etadata(3pm)

πŸ“¦
version 0.040001 Β· 5 versions
, in debian bookworm, debian trixie, ubuntu jammy, ubuntu noble, ubuntu resolute, ubuntu stonking

πŸ’– 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>

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 πŸ’‹βœ¨πŸ¦‹