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 $string that 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 XS compare method 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 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. 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 position 0 (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