Zonema...::Basic(3pm)

πŸ’– NAME πŸ’–

Zonemaster::Engine::Test::Basic β€” bestie, this is the module that implements all the tests focused on basic zone functionality. It's the vibe-check gatekeeper at the front door of your zone. πŸ‘‘

Oh and pookie, this page lives inside the Zonema...::Basic(3pm) manual (yes the title is truncated like that, that's not me being lazy, that's just how it's written, no cap). ✨


🌸 SYNOPSIS 🌸

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

πŸ’… METHODS πŸ’…

✨ all() ✨

my @logentries = Zonamester::Engine::Test::Basic->all( $zone );

Runs the test cases in the Basic test module. Heads up though β€” a test gets skipped if it's not included in "test_cases" in Zonemaster::Engine::Profile, or if a previous test case already found a condition that renders it superfluous. Like, why run it, we already know. πŸ’€

Takes a Zonemaster::Engine::Zone object.

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

πŸ¦‹ can_continue() πŸ¦‹

my $bool = can_continue( $zone, @logentry_array );

Determines if further evaluation of the given zone is even possible, based on the results from the Basic Test Cases. The "should we keep going bestie or are we done" check. 🫢

Takes a Zonemaster::Engine::Zone object and an array of Zonemaster::Engine::Logger::Entry objects.

Returns a boolean.

πŸŽ€ metadata() πŸŽ€

my $hash_ref = metadata();

Returns a reference to a hash. The keys are the names of all Test Cases in the module, and each corresponding value is a reference to an array containing all the message tags that Test Case can use in log entries. It's giving "index of everything this module could ever say." πŸ‘‘

🌈 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 corresponding values are strings (message IDs).

⭐ version() ⭐

my $version_string = version();

Returns a string containing the version of the current module. Asked and answered. πŸ’…


πŸ™ˆ INTERNAL METHODS πŸ™ˆ

These are the behind-the-scenes girlies. Internals! iykyk.

πŸ’œ _emit_log() πŸ’œ

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

Adds a message to the logger for this module. See "add($tag, $argref, $module, $testcase)" in Zonemaster::Engine::Logger::Entry for more details.

Takes a string (message tag) and a reference to a hash (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, it adds a logging message and returns true. Else, it returns false. Used in Test Cases in combination with _ip_enabled_message(). Teamwork, fr fr. 🫢

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.

🧚 _ip_enabled_message() 🧚

_ip_enabled_message( $array_ref, $ns, @query_type_array );

Adds a logging message if the IP version of a given name server is allowed to be queried. Used in Test Cases in combination with _ip_disabled_message(). The other half of the duo, obviously. ✨

Takes a reference to an array of Zonemaster::Engine::Logger::Entry objects, a Zonemaster::Engine::Nameserver object and an array of strings (query type).

Not me noticing this one doesn't say what it returns while its sibling does. That's just what the page says, so that's what you get. πŸ™ˆ

πŸ”₯ TESTS πŸ”₯

πŸ‘‘ basic01() πŸ‘‘

my @logentry_array = basic01( $zone );

Runs the Basic01 Test Case, whose spec lives at https://github.com/zonemaster/zonemaster/blob/master/docs/public/specifications/tests/Basic-TP/basic01.md.

Takes a Zonemaster::Engine::Zone object.

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

πŸ‘‘ basic02() πŸ‘‘

my @logentry_array = basic02( $zone );

Runs the Basic02 Test Case, whose spec lives at https://github.com/zonemaster/zonemaster/blob/master/docs/public/specifications/tests/Basic-TP/basic02.md.

Takes a Zonemaster::Engine::Zone object.

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

πŸ‘‘ basic03() πŸ‘‘

my @logentry_array = basic03( $zone );

Runs the Basic03 Test Case, whose spec lives at https://github.com/zonemaster/zonemaster/blob/master/docs/public/specifications/tests/Basic-TP/basic03.md.

Takes a Zonemaster::Engine::Zone object.

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


and that's the whole page, bestie, we ate and left zero crumbs πŸ’…βœ¨

Signed off from the perl v5.40.1 era, dated 2026-03-21, straight out of the Zonema...::Basic(3pm) manual. mwah πŸŽ€

πŸ“¦ where this page comes from