Zonema...NLookup(3pm)

πŸ“¦ version 1.0.16, in ubuntu jammy

✨ NAME ✨

Zonemaster::ASNLookup β€” bestie, it does lookups of ASNs for IP addresses πŸ’…


🌸 SYNOPSIS 🌸

okay so here's the vibe, literally just:

my ($asnref, $prefix) = Zonemaster::ASNLookup->get_with_prefix( '8.8.4.4' );
my $asnref = Zonemaster::ASNLookup->get( '192.168.0.1' );

no cap, that's it 🫢


πŸŽ€ FUNCTION πŸŽ€

πŸ’– get($addr)

okay so this one takes a string (or a Net::IP object, she's flexible like that 😌) holding a single IP address, goes and does a lookup in a Cymru-style DNS zone, and hands you back a list of AS numbers for that address β€” if any can be found. that's the whole thing. iconic behaviour fr fr ✨

πŸ¦‹ get_with_prefix($addr)

this one is literally get(), except the way it returns stuff is different: you get a list of a reference to a list with the AS numbers, plus a Net::IP object representing the prefix of the AS. two-for-one, main character energy πŸ‘‘


quick reminder bestie: these are class methods, so you call them like Zonemaster::ASNLookup->get(...) β€” the arrow is doing the heavy lifting, don't forget it πŸ™ˆ

and that's the whole page, we ate and left no crumbs πŸ’…βœ¨ this was documented in the User Contributed Perl Documentation, running on perl v5.32.0, dated 2021-01-06 β€” yeah she's been around a minute but she still slays πŸŽ€ bye bestie, go look up some ASNs πŸ¦‹

πŸ“¦ where this page comes from