Net::DNS::RR::A(3)
π Net::DNS::RR::A β the DNS A resource record, bestie edition π
okay so this is a page from the User Contributed Perl Documentation (that's the manual name, cute right?) and it's all about Net::DNS::RR::A β the DNS A resource record. that's the one that maps a name to an IPv4 address. the OG. the main character. π
β¨ SYNOPSIS β¨
the two ways to make one, and honestly? both slay:
use Net::DNS;
$rr = Net::DNS::RR->new('name IN A address');
$rr = Net::DNS::RR->new(
name => 'example.com',
type => 'A',
address => '192.0.2.1'
);
first one's the one-liner string, second one's the hash-y "let me spell it out" version. pick your fighter π
π¦ DESCRIPTION π¦
this class is literally for DNS Address (A) resource records. that's it. that's the whole job. and it does it flawlessly, no cap. π
πΈ METHODS πΈ
so here's the tea: the methods you get are the ones inherited from the base class, plus the type-specific methods that are defined in this package. best of both worlds fr fr.
β οΈ and listen β using undocumented package features, or reaching directly into the internal data structures? discouraged. like, strongly. it could result in program termination or other unpredictable behaviour. so maybe don't. π«Ά
π₯ address π₯
$IPv4_address = $rr->address;
$rr->address( $IPv4_address );
this is the getter/setter for the address itself β a Version 4 IP address, represented using dotted-quad notation. you know the vibe: 192.0.2.1. iconic. β
π COPYRIGHT π
Copyright (c)1997 Michael Fuhr.
All rights reserved.
Package template (c)2009,2012 O.M.Kolkman and R.W.Franks.
π LICENSE π
Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the original copyright notices appear in all copies and that both copyright notice and this permission notice appear in supporting documentation, and that the name of the author not be used in advertising or publicity pertaining to distribution of the software without specific prior written permission.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
(yes, that's the legal bit verbatim β do NOT paraphrase legal text, bestie, that's the one thing we don't freestyle π)
π SEE ALSO π
perlNet::DNSNet::DNS::RRRFC1035(3.4.1)- <https://iana.org/go/rfc1035#section-3.4.1>
go read the RFC, it's giving ancient scrolls but it's actually useful iykyk π
and that's the page!! mwah π this edition comes from perl v5.42.0, dated 2026-09-02 β stay sparkly, go resolve some names, and remember: dotted-quad only, we don't do that here otherwise π§π
π¦ where this page comes from
- opensuse-leap 16.0: perl-Net-DNS 1.570.0-bp160.1.1 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms