DNS::LDNS::Zone(3)
π DNS::LDNS::Zone π
okay so bestie, welcome to the DNS::LDNS::Zone page β it's from the User Contributed Perl Documentation collection, and the manual name itself is DNS::LDNS::Zone(3), which is honestly giving very "I know my way around a zonefile" energy. π
β¨ NAME β¨
DNS::LDNS::Zone β a parsed zonefile. that's it, that's the whole vibe. it's literally your zonefile, but parsed and ready to be cute with. π
π¦ SYNOPSIS π¦
here's the whole little choreography, bestie. look, don't touch yet:
use DNS::LDNS ':all'
my z = new DNS::LDNS::Zone(
filename => '/path/to/myzone',
origin => new DNS::LDNS::RData(LDNS_RDF_TYPE_DNAME, 'myzone'), #optional
default_ttl => 3600, #optional
class => LDNS_RR_CLASS_IN, #optional
)
my z = new DNS::LDNS::Zone(
file => \*FILE,
origin => ..., default_ttl => ..., class => ...
)
my z = new DNS::LDNS::Zone
z->to_string
z->print(\*FILE)
z->canonicalize
z->sort
rr = z->soa
z->set_soa(rr)
rrlist = z->rrs
z->set_rrs(rrlist)
z->sign(keylist)
z->sign_nsec3(keylist, algorithm, flags, iterations, salt)
so basically you've got three ways to make a zone:
- from a
filename, with an optionalorigin(aDNS::LDNS::RDatabuilt fromLDNS_RDF_TYPE_DNAMEand'myzone'in the example), an optionaldefault_ttlof3600, and an optionalclassofLDNS_RR_CLASS_INβ all three marked#optionalin the source, periodt. - from an already-open
filehandle, like\*FILE, with the sameorigin,default_ttlandclasscrew tagging along. - or like, literally nothing.
my z = new DNS::LDNS::Zoneand you're off. main character energy.
and then all the methods you can call on your little zone baby: z->to_string, z->print(\*FILE), z->canonicalize, z->sort, rr = z->soa, z->set_soa(rr), rrlist = z->rrs, z->set_rrs(rrlist), z->sign(keylist), and z->sign_nsec3(keylist, algorithm, flags, iterations, salt). iconic. π«Ά
π SEE ALSO π
go look at the project page, it's right here bestie:
http://www.nlnetlabs.nl/projects/ldns
π AUTHOR π
this gorgeous work is by Erik Pihl Ostlyngen, <erik.ostlyngen@uninett.no> β we love a credited king. π
π COPYRIGHT AND LICENSE π
Copyright (C) 2013 by UNINETT Norid AS
and listen, the legal bit matters so here it is in full:
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.14.2 or, at your option, any later version of Perl 5 you may have available.
no cap, that's the whole license situation. π
and that's the page, bestie!! this version of the docs ships with perl v5.42.2 and was dated 2026-06-11 β so yeah, that's your footer, cute little timestamp and all. go forth and parse your zonefiles, you absolute legend. π¦β¨π
π¦ where this page comes from
- fedora 43: perl-ldns 1.9.2-1.fc43 Β· BSD-3-Clause
- fedora 44: perl-ldns 1.9.2-1.fc44 Β· BSD-3-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms