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, emptyZonemaster::LDNS::RRListobject. It's giving blank canvas, main character origin story, no notes π¦new($rrs)β makes you aZonemaster::LDNS::RRListobject 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 twoZonemaster::LDNS::RRListobjects. The order of theZonemaster::LDNS::RRobjects 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 XScomparemethod with the arguments it needs, rather than the ones overloading gives. So it bypasses the overloading shenanigans entirely.to_stringβ calls the XSstringmethod with the arguments it needs, rather than the ones overloading gives. Functionally it's identical tostring()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
- 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