NAME
TinyDNS::Reader - Read TinyDNS files.
DESCRIPTION
This module allows the parsing of a TinyDNS data-file, or individual records taken from one.
SYNOPSIS
use TinyDNS::Reader;
my $tmp = TinyDNS::Reader->new( file => "./zones/example.com" );
my $dns = $tmp->parse();
foreach my $record ( @$dns )
{
print $record . "\n";
}
DESCRIPTION
This module contains code for reading a zone-file which has been created for use with DJB's tinydns.
A zonefile may be parsed and turned into a series of TinyDNS::Record objects, one for each valid record which is found.
If you wish to merge multiple records, referring to the same hostname, you should also consult the documentation for the TinyeDNS::Reader::Merged module.
METHODS
new
The constructor should be given either a "file
" or "text
" parameter, containing the filename to parse, or the text to parse, respectively.
parse
Process and return an array of TinyDNS::Records from the data contained in the file specified by our constructor, or the scalar reference.
AUTHOR
Steve Kemp <steve@steve.org.uk>
COPYRIGHT AND LICENSE
Copyright (C) 2014 Steve Kemp <steve@steve.org.uk>.
This code was developed for an online Git-based DNS hosting solution, which can be found at:
https://dns-api.com/
This library is free software. You can modify and or distribute it under the same terms as Perl itself.