Zonema...Packet(3pm)
π Zonemaster::Packet π
okay bestie, so this is Zonemaster::Packet, a lil wrapper object from the User Contributed Perl Documentation (that's the 3pm section, iykyk). It wraps up Net::LDNS::Packet objects so you can vibe with DNS packets without touching the raw thing directly. she's giving β¨convenienceβ¨ and honestly? we're obsessed. π
β¨ NAME β¨
Zonemaster::Packet β wrapping object for Net::LDNS::Packet objects. that's it, that's the whole job. π
πΈ SYNOPSIS πΈ
my $packet = $ns->query('iis.se', 'NS');
my @rrs = $packet->get_records('ns');
look at her go π¦ query a name, grab the records, done. no notes.
π ATTRIBUTES π
packetβ holds the Net::LDNS::Packet that the object is wrapping. it's literally the whole point of this class, the main character, the moment. π
π METHODS π
no_such_recordβ returns true if the packet represents an existing DNS node that's just... lacking any records of the type you asked for. node exists, the records are a no-show. πno_such_nameβ returns true if the packet represents a non-existent DNS node. the name is not giving, because it is not there. πis_redirectβ returns true if the packet is a redirect to another set of nameservers. plot twist, new cast. π₯get_records($type[, $section])β returns the Net::LDNS::RR objects of the requested type in the packet. and if you pass that optional$sectionargument, and it's one of"answer","authority"and"additional", then you only get RRs from that section. very "pick your own adventure". πget_records_for_name($type, $name)β returns all the Net::LDNS::RR objects for the given name in the packet. all of them. every single one. π«Άhas_rrs_of_type_for_name($type, $name)β returns true if the packet holds any RRs of the specified type for the given name. a lil yes/no vibe check. βanswerfromβ a wrapper for the underlying packet method, except it replaces undefined values with the string"<unknown>". so when the answer is a mystery, she says so. πTO_JSONβ support method so JSON can actually serialize these objects. thank you for your service, queen. π
π METHODS PASSED THROUGH π
these methods get passed straight through, transparently, to the underlying Net::LDNS::Packet object. no interference, no extra steps, just vibes flowing downstream. β¨
datarcodeaaquestionanswerauthorityadditionalprintstringanswersizeunique_pushtimestamptypeedns_sizeedns_rcodehas_ednsidquerytimedoopcode
fr fr bestie, that's the whole page. every method, every pass-through, every "<unknown>". no cap. π
and that's a wrap π this lil beauty is documented as perl v5.32.0, dated 2021-01-06, and lives under the name Zonemaster::Packet(3pm) in the User Contributed Perl Documentation. slay, go query something. πΈπ β¨
π¦ where this page comes from
- ubuntu jammy: libzonemaster-perl 1.0.16-2.1 Β· BSD-2-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms