DNS::Un...:Result(3)
okay so welcome to DNS::Un...:Result(3), the User Contributed Perl Documentation page for the class DNS::Unbound::Result. The header is a little truncated, but we move. π
π NAME π
DNS::Unbound::Result
yup, that's the class. main character energy only.
π¦ DESCRIPTION π¦
okay so this class literally represents a DNS query result from DNS::Unbound. That's the whole vibe. No cap. β¨
π ACCESSORS π
This class includes an accessor for most members of "struct ub_result" (cf. libunbound(3) (https://nlnetlabs.nl/documentation/unbound/libunbound/)).
The following all return scalars:
qname(),qtype(),qclass(),ttl()rcode(),nxdomain(),havedata(),canonname()secure(),bogus(),why_bogus(),"answer_packet"
data() returns an array reference of byte strings that contain the query result in DNS-native RDATA encoding. periodt. π«Ά
π₯ ADDITIONAL METHODS π₯
π $objs_ar = OBJ->to_net_dns_rrs() π
IMPORTANT: This method is DEPRECATED and will be withdrawn in a forthcoming version. Please migrate to the following logic instead (assuming an instance of this class in $result):
my $packet = Net::DNS::Packet->new( \$result->answer_packet() );
β¦ which will yield a Net::DNS::Packet instance.
The DEPRECATED methodβs documentation follows:
The data() accessorβs return values are raw RDATA. Your application likely prefers to work with parsed DNS data, though. This method facilitates that by loading Net::DNS::RR and returning a reference to an array of instances of that class (i.e., probably a subclass of it like Net::DNS::RR::NS).
So, for example, to get a TXT query resultβs value as a list of character strings, you could do:
@cstrings = map { $_->txtdata() } @{ $result->to_net_dns_rrs() }
mwah π this page is brought to you by perl v5.42.2, dated 2026-02-15, and the manual name is DNS::Un...:Result(3). slay and goodbye. π
π¦ where this page comes from
- alpine 3.24: perl-dns-unbound-doc 0.29-r3 Β· GPL-1.0-or-later OR Artistic-1.0-Perl
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms