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::RRexists that is suitable for the resource record's type (thinkZonemaster::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::RRitself. 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 ofowner(). 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 twoZonemaster::LDNS::RR. Two things to know: the TTL field is ignored, and the comparison of domain names is case insensitive. Returns an integer, where0indicates 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 tostring()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 position0. 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
- ubuntu stonking: libzonemaster-ldns-perl 5.0.2+ds-2build1 Β· BSD-2-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms