Zonema...Packet(3pm)
π NAME π
Zonemaster::Engine::Packet β it's the lil' wrapping object for Zonemaster::LDNS::Packet objects, bestie π
Like, it's a glow-up wrapper. The real packet is underneath, this one just makes it comfy to hold.
β¨ SYNOPSIS β¨
my $packet = $ns->query('iis.se', 'NS');
my @rrs = $packet->get_records('ns');
no cap, that's the whole vibe π
π¦ ATTRIBUTES π¦
packetβ this is where theZonemaster::LDNS::Packetthat the object is wrapping just... lives. It holds it. That's its whole job. Iconic of it honestly.
πΈ CONSTRUCTORS πΈ
newβ construct a new instance. baby packet, born fresh, slay β¨
π METHODS π
no_such_recordβ returns true if the packet is representing an existing DNS node that's just... lacking any records of the type you asked for π like the node exists but the record type ghosted you.no_such_nameβ returns true if the packet represents a DNS node that straight up doesn't exist. not a thing. never was. πis_redirectβ returns true if the packet is a redirect to a whole other set of nameservers. it's giving "not me, go ask them" πget_records($type[, @section])β returns theZonemaster::LDNS::RRobjects of the type you requested in the packet π«Ά If the optional@sectionargument is given, and it's a list of"answer","authority"and"additional", then only RRs from those sections come back to you. filter that feed, periodt.get_records_for_name($type, $name[, @section])β returns all theZonemaster::LDNS::RRobjects for the given name in the packet. If the optional@sectionargument is given, and it's a list of"answer","authority"and"additional", only RRs from those sections are returned. same energy, but now it's name-specific πhas_rrs_of_type_for_name($type, $name[, @section])β returns true if the packet is holding any RRs of the specified type for the given name. yes/no, does it have it, vibe check complete β If the optional@sectionargument is given, and it's a list of"answer","authority"and"additional", only RRs from those sections are returned.answerfromβ a wrapper for the underlying packet method, except it replaces undefined values with the string"<unknown>"π so you never get a sad empty nothing, you get a labeled sad empty nothing.TO_JSONβ support method so JSON can serialize these objects. it's giving "make me JSON-able" π
π METHODS PASSED THROUGH π
These methods are passed through transparently to the underlying Zonemaster::LDNS::Packet object. like, they don't even stop to say hi, they just go straight through π§
datarcodeaaratcquestionanswerauthorityadditionalstringunique_pushtimestamptypeedns_sizeedns_rcodeedns_versionedns_zedns_datahas_ednsidquerytimedoopcode
lowkey important: the passed-through ones are literally just relayed to the packet underneath, so whatever they do lives over there, not here π
okay that's the whole page bestie, mwah π this one's from the User Contributed Perl Documentation, perl v5.40.1, dated 2026-03-21 β go forth and wrap packets, you ate ππ
π¦ where this page comes from
- ubuntu stonking: libzonemaster-perl 8.001.001-1 Β· BSD-2-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms