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 the Zonemaster::LDNS::Packet that 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 the Zonemaster::LDNS::RR objects of the type you requested in the packet 🫢 If the optional @section argument 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 the Zonemaster::LDNS::RR objects for the given name in the packet. If the optional @section argument 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 @section argument 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 🧚

  • data
  • rcode
  • aa
  • ra
  • tc
  • question
  • answer
  • authority
  • additional
  • string
  • unique_push
  • timestamp
  • type
  • edns_size
  • edns_rcode
  • edns_version
  • edns_z
  • edns_data
  • has_edns
  • id
  • querytime
  • do
  • opcode

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