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.
_name_has_only_legal_characters()
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
- ubuntu stonking: libzonemaster-perl 8.001.001-1 ยท BSD-2-Clause
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms