DNS::Zone::Struct::To::BIND - Generate BIND zone configuration from structure
This document describes version 0.006 of DNS::Zone::Struct::To::BIND (from Perl distribution DNS-Zone-Struct-To-BIND), released on 2019-09-17.
use DNS::Zone::Struct::To::BIND qw(gen_bind_zone_from_struct); say gen_bind_zone_from_struct( zone => { records => [ {type=>'SOA', name=>'', host=>'', ttl=>300, serial=>'2019072401', refresh=>7200, retry=>1800, expire=>12009600, email=>'hostmaster@example.org'}, {type=>'NS', name=>'', host=>'ns1.example.com'}, {type=>'NS', name=>'', host=>'ns2.example.com'}, {type=>'A' , name=>'', address=>'1.2.3.4'}, {type=>'CNAME', name=>'www', canon=>''}, ], }, master_host => 'ns1.example.com', );
will output something like:
$TTL 300 @ IN 300 SOA ns1.example.com. hostmaster.example.org. ( 2019072401 ;serial 7200 ;refresh 1800 ;retry 12009600 ;expire 300 ;ttl ) IN NS ns1.example.com. IN NS ns2.example.com. IN A 1.2.3.4 www IN CNAME @
Usage:
gen_bind_zone_from_struct(%args) -> any
Generate BIND zone configuration from structure.
This function is not exported by default, but exportable.
Arguments ('*' denotes required arguments):
master_host* => net::hostname
zone* => dns::zone
DNS zone structure, as described in the dns::zone Sah schema (see Sah::Schema::dns::zone).
dns::zone
Return value: (any)
Please visit the project's homepage at https://metacpan.org/release/DNS-Zone-Struct-To-BIND.
Source repository is at https://github.com/perlancar/perl-DNS-Zone-Struct-To-BIND.
Please report any bugs or feature requests on the bugtracker website https://rt.cpan.org/Public/Dist/Display.html?Name=DNS-Zone-Struct-To-BIND
When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature.
Sah::Schemas::DNS
perlancar <perlancar@cpan.org>
This software is copyright (c) 2019 by perlancar@cpan.org.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install DNS::Zone::Struct::To::BIND, copy and paste the appropriate command in to your terminal.
cpanm
cpanm DNS::Zone::Struct::To::BIND
CPAN shell
perl -MCPAN -e shell install DNS::Zone::Struct::To::BIND
For more information on module installation, please visit the detailed CPAN module installation guide.