GeoIP2...l::ASN(3pm)

πŸ“¦
version 2.006002 Β· 6 versions
, in debian bookworm, debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking

πŸ’– NAME πŸ’–

GeoIP2::Model::ASN β€” bestie, it's the model class for the GeoLite2 ASN database ✨


🌸 VERSION 🌸

version 2.006002 β€” yes ma'am, that's the one πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

okay so here's the whole vibe, copy-paste ready:

use 5.008;

use GeoIP2::Model::ASN ();

my $asn = GeoIP2::Model::ASN->new(
    raw => {
        autonomous_system_number => '217',
        autonomous_system_organization => 'University of Minnesota',
        ip_address => '128.101.101.101',
    }
);

print $asn->autonomous_system_number(), "\n";
print $asn->autonomous_system_organization(), "\n";

look at that. clean. we love to see it πŸ’…


🌈 DESCRIPTION 🌈

so this class is literally the model for the data that comes back out of the GeoLite2 ASN database. that's the whole job. it's giving "I hold the data and I do it beautifully" πŸ‘‘


✨ METHODS ✨

she comes with the following methods, no cap:

πŸ’œ $asn->autonomous_system_number()

this one hands you back the autonomous system number that goes with the IP address.

the wiki for it lives over at http://en.wikipedia.org/wiki/Autonomous_system_(Internet) β€” iykyk 🧚

πŸ’œ $asn->autonomous_system_organization()

this one gives you the organization tied to that registered autonomous system number for the IP address.

same wiki energy: http://en.wikipedia.org/wiki/Autonomous_system_(Internet) 🌟

πŸ’œ $asn->ip_address()

returns the IP address that was used in the lookup. simple. iconic. periodt πŸ’–


🫢 SUPPORT 🫢

got a bug? don't suffer in silence bestie, submit it through https://github.com/maxmind/GeoIP2-perl/issues β€” they're actually gonna look at it, fr fr πŸ™ˆ


πŸ‘‘ AUTHORS πŸ‘‘

the literal main characters who made this happen:

  • Dave Rolsky <drolsky@maxmind.com>
  • Greg Oschwald <goschwald@maxmind.com>
  • Mark Fowler <mfowler@maxmind.com>
  • Olaf Alders <oalders@maxmind.com>

this software is copyright (c) 2013 - 2019 by MaxMind, Inc.

it's free software, so you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. go off, respectfully πŸ’–


ngl that's the whole page, you ate that read πŸ’…

perl v5.36.0 Β· 2022-11-21 Β· GeoIP2::Model::ASN(3pm) β€” mwah, that's a wrap, bestie πŸ¦‹βœ¨

πŸ“¦ where this page comes from