Zonema...Example(3pm)
π Zonemaster::Test::Example β the vibe β¨
okay bestie, so this is Zonemaster::Test::Example, and it lives in the User Contributed Perl Documentation (that's the 3pm section, iykyk π). It's an example module showing the expected structure of Zonemaster test modules β like, it's literally the blueprint, the template, the "here's how your test module should look" moment π
πΈ NAME πΈ
Zonemaster::Test::Example β an example module showing the expected structure of Zonemaster test modules π
β¨ SYNOPSIS β¨
my @results = Zonemaster::Test::Example->all($zone);
that's it, that's the whole entry point, and it's giving effortless π¦
π«Ά METHODS π«Ά
all($zone)β runs the default set of tests and hands you back a list of log entries made by the tests. like, the whole suite, one call, no cap πβ¨metadata()β returns a reference to a hash. the keys are the names of all the test methods in the module, and each value is a reference to a list holding all the tags that method can use in log entries. so basically a little map of "who are you and what can you say" πΊοΈtranslation()β returns a reference to a nested hash. outermost keys are language codes, the keys below that are message tags, and their values are translation strings. multilingual queen behavior ππpolicy()β returns a reference to a hash with the default policy for the module. keys are message tags, and the values are their default log levels. the rules, bestie, the rules βοΈversion()β returns a version string for the module. short, sweet, iconic π·οΈ
π§ TESTS π§
placeholder($zone)β since this is an example module, this test does nothing except return a single log entry. it's the little ghost of a test, haunting the file for structural reasons π» (not me being a test that doesn't test anythingβ¦ honestly? relatable.)
heads up bestie: this module is a structure example, so don't go expecting placeholder to actually validate a zone. it returns one log entry, that's its whole personality π
and that's the tea β β this page is from perl v5.32.0, dated 2021-01-06, and it's filed under the Zonemaster::Test::Example(3pm) header. go build something slay with it πβ¨π
π¦ where this page comes from
- ubuntu jammy: libzonemaster-perl 1.0.16-2.1 Β· BSD-2-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms