Zonema...Syntax(3pm)

โœจ Zonema...Syntax โ€” the manual, but make it make sense โœจ

okay bestie, this is the user contributed perl documentation for Zonema...Syntax(3pm) and honestly? it's giving "small module, big responsibilities" ๐Ÿ’… she validates the syntax of host names and other data, and she does NOT miss.


๐ŸŒธ NAME ๐ŸŒธ

Zonemaster::Engine::Test::Syntax โ€” a module implementing tests focused on validating the syntax of host names and other data ๐Ÿฆ‹

like, she reads your names and she's like "hmm. that's not legal characters, babe." iconic behaviour honestly.


โœจ SYNOPSIS โœจ

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

that's it. that's the whole vibe check. one line and you've run everything ๐Ÿซถ


๐Ÿ’– METHODS ๐Ÿ’–

all()

my @logentry_array = all( $zone );

runs the default set of tests for that module โ€” which is between three and eight tests depending on the tested zone ๐Ÿ”ฅ and here's the tea: if Syntax01 passes, the remaining tests are run. so Syntax01 is lowkey the bouncer at the club.

she takes a Zonemaster::Engine::Zone object ๐ŸŽ€

and she returns a list of Zonemaster::Engine::Logger::Entry objects. periodt.


metadata()

my $hash_ref = metadata();

returns a reference to a hash, where the keys are the names of all Test Cases in the module ๐Ÿ‘‘ and each corresponding value is a reference to an array holding all the message tags that that Test Case can use in log entries. it's giving "receipts for every test" ๐Ÿ’€


tag_descriptions()

my $hash_ref = tag_descriptions();

used by the built-in translation system ๐Ÿงš

returns a reference to a hash where the keys are the message tags and the values are strings (message IDs). very multilingual of her, no cap.


version()

my $version_string = version();

returns a string containing the version of the current module โญ like a little name tag but for a perl module.


๐Ÿ”ฎ INTERNAL METHODS ๐Ÿ”ฎ

these are the private besties. you can look, but they're meant for the module's own use internally, mmkay? ๐Ÿ™ˆ

_emit_log()

my $log_entry = _emit_log( $message_tag_string, $hash_ref );

adds a message to the logger for this module ๐Ÿ“ for the full deets, go look at add($tag, $argref, $module, $testcase) in Zonemaster::Engine::Logger::Entry.

takes a string (the message tag) and a reference to a hash (the arguments).

returns a Zonemaster::Engine::Logger::Entry object ๐Ÿ’œ


_ip_disabled_message()

my $bool = _ip_disabled_message( $logentry_array_ref, $ns, @query_type_array );

checks if the IP version of a given name server is allowed to be queried ๐Ÿ‘€ if it's not allowed, she adds a logging message and returns true. otherwise she returns false. simple as.

takes a reference to an array of Zonemaster::Engine::Logger::Entry objects, a Zonemaster::Engine::Nameserver object, and an array of strings (query type) ๐ŸŒˆ

returns a boolean.


my $bool = _name_has_only_legal_characters( $name );

checks if a given name contains only allowed characters โœจ accountability check fr fr.

takes a Zonemaster::Engine::DNSName object.

returns a boolean.


_label_starts_with_hyphen()

my $bool = _label_starts_with_hyphen( $name );

checks if a given name starts with a hyphen ('-') ๐ŸŽ€ like, starting with a -? in this economy?

takes a Zonemaster::Engine::DNSName object.

returns a boolean.


_label_ends_with_hyphen()

my $bool = _label_ends_with_hyphen( $name );

checks if a given name ends with a hyphen ('-') ๐ŸŒธ the dramatic outro version.

takes a Zonemaster::Engine::DNSName object.

returns a boolean.


_label_not_ace_has_double_hyphen_in_position_3_and_4()

my $bool = _label_not_ace_has_double_hyphen_in_position_3_and_4( $name );

checks if a given name does not contain a double hyphen ('--'), with the exception of 'xn--' ๐Ÿ’… so xn-- gets a free pass because that's the ACE prefix and she's not about to fight it.

takes a Zonemaster::Engine::DNSName object.

returns a boolean.


_check_name_syntax()

my @logentry_array = _check_name_syntax( $label_prefix_string, $name );

checks the syntax of a given name ๐Ÿ” she makes use of "_name_has_only_legal_characters()" and "_label_not_ace_has_double_hyphen_in_position_3_and_4()". she's used as a helper function for Test Cases Syntax04, Syntax07 and Syntax08 ๐Ÿซถ

takes a string (label prefix) and either a string (name) or a Zonemaster::Engine::DNSName object.

returns a list of Zonemaster::Engine::Logger::Entry objects.


๐Ÿงช TESTS ๐Ÿงช

okay this is the main event, the whole point, the moment โ€” eight test cases, all taking the same thing and all returning the same thing. ugh, consistency, we love to see it ๐Ÿ’–

syntax01()

my @logentry_array = syntax01( $zone );

runs the Syntax01 Test Case โ€” spec lives at https://github.com/zonemaster/zonemaster/blob/master/docs/public/specifications/tests/Syntax-TP/syntax01.md ๐Ÿ“„

takes a Zonemaster::Engine::Zone object.

returns a list of Zonemaster::Engine::Logger::Entry objects.


syntax02()

my @logentry_array = syntax02( $zone );

runs the Syntax02 Test Case โ€” spec lives at https://github.com/zonemaster/zonemaster/blob/master/docs/public/specifications/tests/Syntax-TP/syntax02.md ๐Ÿ“„

takes a Zonemaster::Engine::Zone object.

returns a list of Zonemaster::Engine::Logger::Entry objects.


syntax03()

my @logentry_array = syntax03( $zone );

runs the Syntax03 Test Case โ€” spec lives at https://github.com/zonemaster/zonemaster/blob/master/docs/public/specifications/tests/Syntax-TP/syntax03.md ๐Ÿ“„

takes a Zonemaster::Engine::Zone object.

returns a list of Zonemaster::Engine::Logger::Entry objects.


syntax04()

my @logentry_array = syntax04( $zone );

runs the Syntax04 Test Case โ€” spec lives at https://github.com/zonemaster/zonemaster/blob/master/docs/public/specifications/tests/Syntax-TP/syntax04.md ๐Ÿ“„ (yes, this is one of the three that borrows _check_name_syntax(), iykyk)

takes a Zonemaster::Engine::Zone object.

returns a list of Zonemaster::Engine::Logger::Entry objects.


syntax05()

my @logentry_array = syntax05( $zone );

runs the Syntax05 Test Case โ€” spec lives at https://github.com/zonemaster/zonemaster/blob/master/docs/public/specifications/tests/Syntax-TP/syntax05.md ๐Ÿ“„

takes a Zonemaster::Engine::Zone object.

returns a list of Zonemaster::Engine::Logger::Entry objects.


syntax06()

my @logentry_array = syntax06( $zone );

runs the Syntax06 Test Case โ€” spec lives at https://github.com/zonemaster/zonemaster/blob/master/docs/public/specifications/tests/Syntax-TP/syntax06.md ๐Ÿ“„

takes a Zonemaster::Engine::Zone object.

returns a list of Zonemaster::Engine::Logger::Entry objects.


syntax07()

my @logentry_array = syntax07( $zone );

runs the Syntax07 Test Case โ€” spec lives at https://github.com/zonemaster/zonemaster/blob/master/docs/public/specifications/tests/Syntax-TP/syntax07.md ๐Ÿ“„ (another _check_name_syntax() girlie ๐Ÿ’œ)

takes a Zonemaster::Engine::Zone object.

returns a list of Zonemaster::Engine::Logger::Entry objects.


syntax08()

my @logentry_array = syntax08( $zone );

runs the Syntax08 Test Case โ€” spec lives at https://github.com/zonemaster/zonemaster/blob/master/docs/public/specifications/tests/Syntax-TP/syntax08.md ๐Ÿ“„ (and the third _check_name_syntax() user โ€” the trio is complete ๐ŸŽ€)

takes a Zonemaster::Engine::Zone object.

returns a list of Zonemaster::Engine::Logger::Entry objects.


and that's the whole page, bestie ๐Ÿฆ‹ every test accounted for, no crumbs left. this came to you courtesy of perl v5.40.1, dated 2026-03-21, and she ate, no notes. mwah ๐Ÿ’‹โœจ

๐Ÿ“ฆ where this page comes from