NAME

Zonemaster::Engine::Test::Syntax - test validating the syntax of host names and other data

SYNOPSIS

my @results = Zonemaster::Engine::Test::Syntax->all($zone);

METHODS

all($zone)

Runs the default set of tests and returns a list of log entries made by the tests.

tag_descriptions()

Returns a refernce to a hash with translation functions. Used by the builtin translation system.

metadata()

Returns a reference to a hash, the keys of which are the names of all test methods in the module, and the corresponding values are references to lists with all the tags that the method can use in log entries.

version()

Returns a version string for the module.

TESTS

syntax01($name)

Verifies that the name (Zonemaster::Engine::DNSName) given contains only allowed characters.

syntax02($name)

Verifies that the name (Zonemaster::Engine::DNSName) given does not start or end with a hyphen ('-').

syntax03($name)

Verifies that the name (Zonemaster::Engine::DNSName) given does not contain a hyphen in 3rd and 4th position (in the exception of 'xn--').

syntax04($name)

Verify that a nameserver (Zonemaster::Engine::DNSName) given is conform to previous syntax rules. It also verify name total length as well as labels.

syntax05($zone)

Verify that a SOA rname (Zonemaster::Engine::DNSName) given has a conform usage of at sign (@).

syntax06($zone)

Verify that a SOA rname (Zonemaster::Engine::DNSName) given is RFC822 compliant.

syntax07($zone)

Verify that SOA mname of zone given is conform to previous syntax rules (syntax01, syntax02, syntax03). It also verify name total length as well as labels.

syntax08(@mx_names)

Verify that MX name (Zonemaster::Engine::DNSName) given is conform to previous syntax rules (syntax01, syntax02, syntax03). It also verify name total length as well as labels.

INTERNAL METHODS

get_name($item)

Converts argument to a Zonemaster::Engine::DNSName object.

check_name_syntax

Implementation of some tests that are used on several kinds of input.