Zonema...RRList(3pm)

✨ NAME ✨

Zonemaster::LDNS::RRList β€” the class that's literally a whole list of resource records, bestie πŸ’…

It lives in the Zonemaster::LDNS::RRList lane, and it's part of the user-contributed Perl documentation situation, iykyk.


🌸 SYNOPSIS 🌸

Okay so here's the vibe, in one line:

my $rrlist = Zonemaster::LDNS::RRList->new( $rrs_aref );

That's it, that's the whole first look. Slay.


πŸŽ€ CLASS METHODS πŸŽ€

  • new() β€” makes you a brand-new, squeaky-clean, empty Zonemaster::LDNS::RRList object. It's giving blank canvas, main character origin story, no notes πŸ¦‹
  • new($rrs) β€” makes you a Zonemaster::LDNS::RRList object but populated with the resource records you hand over.

It takes a reference to an array of Zonemaster::LDNS::RR objects. So yes, an aref of RRs, that's the whole bit.

And it returns a Zonemaster::LDNS::RRList object back to you. Periodt πŸ’–


πŸ‘‘ INSTANCE METHODS πŸ‘‘

  • count() β€” tells you how many RRs are chillin' in the list. Just the number, no drama.
  • compare($other) β€” compares two Zonemaster::LDNS::RRList objects. The order of the Zonemaster::LDNS::RR objects inside the list does not matter (she does not care about your lineup, she cares about your content πŸ’…). The TTL field is ignored, and comparing domain names is case insensitive.

It returns an integer, and 0 means they're equal. So if you get 0, that's a good thing here, not a bad thing, don't panic 😭

  • get($pos) β€” retrieves the RR at the position you asked for. Example:
my $rr = Zonemaster::LDNS::RRList->get( 0 );

It takes an integer. It returns a Zonemaster::LDNS::RR object β€” or undef if there was no RR at that spot. Ghosted by an index, we've all been there πŸ™ˆ

  • push($rr) β€” pushes an RR onto the list. Adding to the roster, as one does ✨
  • pop() β€” pops an RR off the list. Bye bestie, thanks for coming 🫢
  • is_rrset() β€” returns true or false depending on if the list is an RRset or not.
Heads up bestie, this is important: the underlying LDNS function appears to have a bug, because the comparison of the owner name field is case sensitive. See https://github.com/NLnetLabs/ldns/pull/251 β€” go look at it, not me guessing, fr fr πŸ’€
  • string() β€” returns a string with the list of RRs in presentation format. Pretty-printed for your viewing pleasure 🌈
  • do_compare($other) β€” calls the XS compare method with the arguments it needs, rather than the ones overloading gives. So it bypasses the overloading shenanigans entirely.
  • to_string β€” calls the XS string method with the arguments it needs, rather than the ones overloading gives. Functionally it's identical to string() from the Perl level, except it's a tiny little bit slower. Yeah. Slower. We said what we said 🧚

πŸ’œ THE CUTE LITTLE SIGN-OFF πŸ’œ

This page is perl version v5.42.3, dated 2026-08-19, and it's filed under Zonema...RRList(3pm) in the user-contributed Perl documentation corner. Go forth and list your resource records, queen πŸ‘‘πŸŒΈ

πŸ“¦ where this page comes from