Scroll to navigation

Zonemaster::LDNS::RR(3pm) User Contributed Perl Documentation Zonemaster::LDNS::RR(3pm)

NAME

Zonemaster::LDNS::RR - common baseclass for all classes representing resource records.

SYNOPSIS

    my $rr = Zonemaster::LDNS::RR->new('www.iis.se IN A 91.226.36.46');

OVERLOADS

This class overloads stringify and comparisons ('""', '<=>' and 'cmp').

CLASS METHOD

Creates a new RR object, which is an instance of a suitable subclass of Zonemaster::LDNS::RR, given a string representing an RR in common presentation format.

If a subclass of Zonemaster::LDNS::RR exists that is suitable for the resource record’s type (e.g. Zonemaster::LDNS::RR::AAAA, Zonemaster::LDNS::RR::TXT, etc.), then the resulting object is an instance of that subclass.

If no such subclass exists (e.g. when passed a resource record of an unknown type or a type not yet supported by Zonemaster-LDNS), the resulting object is an instance of Zonemaster::LDNS::RR. The instance methods defined in this class will still work, but there is no support for structured access to the resource record’s RDATA.

INSTANCE METHODS

Returns the owner name of the RR.
An alias of owner().
Returns the ttl of the RR.
Return the type of the RR.
Returns the class of the RR.
Returns a string with the RR in presentation format.
Compares two Zonemaster::LDNS::RR. The TTL field is ignored, and the comparison of domain names is case insensitive.

Returns an integer, where 0 indicates equality.

Calls the XS "compare" method with the arguments it needs, rather than the ones overloading gives.
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.
The number of RDATA objects in this RR.
The raw data of the RDATA object in the given position. The first item is in position 0. If an attempt is made to fetch RDATA from a position that doesn't have any, an exception will be thrown.
2026-03-11 perl v5.40.1