Zonema...NS::RR(3pm)

πŸ’– Zonemaster::LDNS::RR β€” the whole vibe πŸ’–

okay so bestie, welcome to the Zonemaster::LDNS::RR era ✨ (that's a Perl module, part of the User Contributed Perl Documentation, and yes the manual page title is technically Zonema...NS::RR(3pm) β€” the truncation is giving ✨mystery✨ but we move). This is the common baseclass for every class that represents a resource record. Every single one. It's the mother of the RR family and she ate πŸ’…


🌸 NAME 🌸

Zonemaster::LDNS::RR β€” the common baseclass for all classes representing resource records. no cap, that's the whole job title πŸŽ€


🌈 SYNOPSIS 🌈

my $rr = Zonemaster::LDNS::RR->new('www.iis.se IN A 91.226.36.46');

literally one line and you're in the group chat 🫢


πŸ’« OVERLOADS πŸ’«

This class overloads stringify and comparisons β€” specifically '""', '<=>' and 'cmp'. so your RR objects can just… behave like strings when the situation calls for it. main character behavior honestly πŸ‘‘


πŸ¦‹ CLASS METHOD πŸ¦‹

new($string)

Creates a new RR object. Not just any RR object though β€” an instance of a suitable subclass of Zonemaster::LDNS::RR, built from a string that represents an RR in common presentation format πŸ’–

Here's the tea on which subclass you get:

  • If a subclass of Zonemaster::LDNS::RR exists that is suitable for the resource record's type (think Zonemaster::LDNS::RR::AAAA, Zonemaster::LDNS::RR::TXT, etc.), then the resulting object is an instance of that subclass. glow up achieved ✨
  • If no such subclass exists (e.g. when you pass a resource record of an unknown type, or a type not yet supported by Zonemaster-LDNS), then the resulting object is just an instance of Zonemaster::LDNS::RR itself. The instance methods defined in this class will still work β€” she's still functional, she's fine β€” but there is no support for structured access to the resource record's RDATA. it's giving ✨raw✨ 😭

πŸŽ€ INSTANCE METHODS πŸŽ€

  • owner() β€” Returns the owner name of the RR. like, whose record is this πŸ’
  • name() β€” An alias of owner(). same energy, different name, we love a two-for-one 🫢
  • ttl() β€” Returns the ttl of the RR. how long it lingers, bestie ⏳
  • type() β€” Return the type of the RR. (yes, the original says "Return", we keep it, we don't gatekeep grammar πŸ‘‘)
  • class() β€” Returns the class of the RR. not a school class. the DNS kind πŸŽ€
  • string() β€” Returns a string with the RR in presentation format. the glow-up-to-text pipeline ✨
  • compare($other) β€” Compares two Zonemaster::LDNS::RR. Two things to know: the TTL field is ignored, and the comparison of domain names is case insensitive. Returns an integer, where 0 indicates equality. zero means we're twins πŸ’…
  • do_compare($other) β€” Calls the XS "compare" method with the arguments it needs, rather than the ones overloading gives. the backstage pass version 🎟️
  • to_string β€” Calls the XS "string" method with the arguments it needs, rather than the ones overloading gives. Functionally identical to string() from the Perl level, except for being a tiny little bit slower. she's the same girl, just took the scenic route 🐌✨
  • rd_count() β€” The number of RDATA objects in this RR. count 'em πŸ”’
  • rdf($postion) β€” The raw data of the RDATA object in the given position. The first item is in position 0. If an attempt is made to fetch RDATA from a position that doesn't have any, an exception will be thrown. so like… don't reach into the void, bestie πŸ’€
heads up: the parameter is spelled $postion in the original and we are preserving that typo with love. it's iconic, it stays, periodt πŸ’–

perl v5.42.3 Β· 2026-08-19 β€” and that's a wrap on the Zonema...NS::RR(3pm) page 🫢 slay, go forth and new-up some resource records πŸŒˆβ­πŸ’œ

πŸ“¦ where this page comes from