Net::LDNS::RR(3pm)
π NAME π
Net::LDNS::RR β it's the common baseclass for all the classes that represent resource records. like, every RR class you meet is gonna be a child of this one. periodt.
β¨ SYNOPSIS β¨
okay so bestie, the vibe is literally this:
my $rr = Net::LDNS::RR->new('www.iis.se IN A 91.226.36.46');
that's it. that's the whole thing. π¦
πΈ OVERLOADS πΈ
This class is iconic and overloads stringify and comparisons, specifically:
'""''<=>''cmp'
so she slays in string context and she slays in comparison context. main character energy fr fr. π
π CLASS METHOD π
new($string)β creates a brand new RR object of a suitable subclass (she picks the right one for you, no cap β¨), given a$stringthat represents an RR in common presentation format.
π INSTANCE METHODS π
owner()name()β these two both return the owner name of the RR. yeah they're twins, they do the same thing, we don't make the rules. π«Άttl()β returns the ttl of the RR.type()β returns the type of the RR.class()β returns the class of the RR.string()β returns a string with the RR in presentation format.do_compare($other)β calls the XScomparemethod with the arguments it actually needs, rather than the ones overloading hands it. so like, overloading stays in its lane and this one does the real work. πͺto_stringβ calls the XSstringmethod 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. honestly barely a difference, but she's honest about it. π’rd_count()β the number of RDATA objects in this RR.rdf($postion)β the raw data of the RDATA object in the given position. the first item is in position0(zero-indexed, as the universe intended). β
β οΈ heads up bestie: if an attempt is made to fetch RDATA from a position that doesn't have any, an exception will be thrown. she will NOT be quiet about it. π
and that's the whole page, you ate that π this was Net::LDNS::RR from the User Contributed Perl Documentation, and the version floating around when this got written down was perl v5.42.3 dated 2026-08-19. mwah, go forth and query responsibly π
π
π¦ where this page comes from
- ubuntu stonking: libnet-ldns-perl 0.75-7build7 Β· 2-clause-BSD
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms