NAME
TinyDNS::Record - Parse a single TinyDNS Record.
DESCRIPTION
This module provides an object API to a single TinyDNS record/line.
It is not quite valid because:
We ignore SOA records, which Amazon would handle for us.
Our TXT records handling uses "T" not ":".
Our MX record handling allows a name to be set with no IP.
There are probably other differences.
METHODS
new
Constructor, which sets the type of the object.
The constructor is expected to be passed a valid line of text which describes a single record, for example +example.example.com:1.2.3.4:200
.
input
Return the text that this record was created with.
valid
Is this record valid? Return 0 or 1 as appropriate.
type
Return the type this record has, such as "A", "AAAA", "NS", etc.
ttl
Return the TTL of this recrd.
If no TTL was explicitly specified we default to 300 seconds, or five minutes.
name
Get the name of this record.
value
Get the value of this record.
add
Add a new value to the existing record.
This is used by the TinyDNS::Reader::Merged module.
stringify
Convert the record to a string, suitable for printing.
hash
Return a consistent hash of the record.
AUTHOR
Steve Kemp <steve@steve.org.uk>
COPYRIGHT AND LICENSE
Copyright (C) 2014-2015 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.