Zonema...Engine(3pm)
π Zonemaster::Engine β the vibe-coded guide π
okay bestie, so this is the manual for the main Zonemaster::Engine module β it's the section-3pm Perl doc, so it lives with the perl module pages. Basically: a tool to check the quality of a DNS zone. π¦
π NAME π
Zonemaster::Engine β a tool to check the quality of a DNS zone. That's it, that's the whole job, and honestly? iconic. π
β¨ SYNOPSIS β¨
my @results = Zonemaster::Engine->test_zone('iis.se')
like. one line. that's all it takes. slay.
πΈ INTRODUCTION πΈ
Hiii so this manual describes the main Zonemaster::Engine module. If what you're actually after is documentation on the Zonemaster test engine as a whole, go read Zonemaster::Engine::Overview instead β that's the bigger-picture one, this is the main-character module. π
π METHODS π
okay this is the whole menu, no skipping, we're doing all of them π«Ά
init_engine()β Runs the initialization tasks if they haven't been run already. And listen: this method is called automatically in theINITblock, so you don't even have to think about it. not me getting my whole setup done for me β¨test_zone($name)β Runs all available tests and hands you back a list ofZonemaster::Engine::Logger::Entryobjects. this is the big one fr fr.test_module($module, $name)β Runs all available tests for the zone with the given name, but only inside the module you specified. like, one specific module, bestie. πtest_method($module, $method, $name)β Run one particular test method in one particular module for one particular zone. Very precise. Very demure. But there's rules:- the requested module must be in the list of currently enabled modules (so: not a module that the current profile disabled it), and
- the method must be listed in the metadata of the module's exports.
- If those requirements are fulfilled, the method will be called with the provided arguments. if not? no method for you π
zone($name)β Returns aZonemaster::Engine::Zoneobject for the given name. cute lil object for your name.ns($name, $address)β Returns aZonemaster::Engine::Nameserverobject for the given name and address. you gotta give both, no cap.profile()β Returns the effective profile, which is aZonemaster::Engine::Profileobject. the settings vibe check πlogger()β Returns the globalZonemaster::Engine::Loggerobject. global, so like, everybody's sharing it.all_tags()β Returns a list of all the tags that can be logged for all available test modules. every single one. the whole tag collection. obsessed.all_methods()β Returns a hash, where the keys are test module names and the values are lists with the names of the test methods in that module. two-for-one, we love a hash.recurse($name, $type, $class)β Does a recursive lookup for the given name, type and class, and returns the resulting packet (if any). Under the hood it simply calls"recurse" in Zonemaster::Engine::Recursoron a globally stored object. iykyk. π§can_continue()β In case of a critical condition that prevents the tool from processing tests, add test here and return False. like a little bouncer at the door of the test suite. π§save_cache($filename)β After running the tests, save the accumulated cache to a file with the given name. Memento but for DNS data, periodt. πΎpreload_cache($filename)β Before running the tests, load the cache with information from a file with the given name. β οΈ This file must have the same format as is produced by"save_cache()"β otherwise it's not gonna go well, bestie, do not test that.asn_lookup($ip)β Takes a single IP address (and yes it can be a string or aNet::IP::XSobject) and returns a list of AS numbers, if any. flex. πmodules()β Returns a list of the loaded test modules. This is exactly the same as"modules" in Zonemaster::Engine::Test. same thing, twin behaviour. π―add_fake_delegation($domain, $data, %flags)β This method adds some fake delegation information to the system. (fake it till you make it, but for delegation data π )
The arguments are a domain name, and a hashref with delegation information. The keys in the hash are nameserver names, and the values are arrayrefs of IP addresses for their corresponding nameserver. Alternatively the IP addresses may be specified as an undef, which is handled the same as an empty arrayref.
For each provided nameserver with an empty list of addresses, either a FAKE_DELEGATION_NO_IP or a FAKE_DELEGATION_IN_ZONE_NO_IP message is emitted. π’
The only recognized flag is fill_in_empty_oob_glue. This flag is boolean and defaults to true. If this flag is true, this method updates the given $data by looking up and filling in some glue addresses. Specifically the glue addresses for any nameserver name that are out-of-bailiwick of the given $domain and that comes with an empty list of addresses.
Returns 1 if all name servers in $data have non-empty lists of glue (after they've been filled in) or if fill_in_empty_oob_glue is false. Otherwise it returns undef. β¨
Examples:
Zonemaster::Engine->add_fake_delegation(
'lysator.liu.se' => {
'ns1.nic.fr' => [ ],
'ns.nic.se' => [ '212.247.7.228', '2a00:801:f0:53::53' ],
'i.ns.se' => [ '194.146.106.22', '2001:67c:1010:5::53' ],
'ns3.nic.se' => [ '212.247.8.152', '2a00:801:f0:211::152' ]
},
);
returns 1. β
Zonemaster::Engine->add_fake_delegation(
'lysator.liu.se' => {
'ns1.lysator.liu.se' => [ ],
'ns.nic.se' => [ '212.247.7.228', '2a00:801:f0:53::53' ],
'i.ns.se' => [ '194.146.106.22', '2001:67c:1010:5::53' ],
'ns3.nic.se' => [ '212.247.8.152', '2a00:801:f0:211::152' ]
}
);
returns "undef" (signalling that fake delegation with empty glue was added to the system). π«
Zonemaster::Engine->add_fake_delegation(
'lysator.liu.se' => {
'ns1.nic.fr' => [ ],
'ns.nic.se' => [ '212.247.7.228', '2a00:801:f0:53::53' ],
'i.ns.se' => [ '194.146.106.22', '2001:67c:1010:5::53' ],
'ns3.nic.se' => [ '212.247.8.152', '2a00:801:f0:211::152' ]
},
fill_in_empty_oob_glue => 0,
);
returns 1. It does not even attempt to fill in glue for ns1.nic.fr. it said "not my problem" and honestly same π
add_fake_ds($domain, $data)β This method adds fake DS records to the system. The arguments are a domain name, and a reference to a list of references to hashes. The hashes in turn must have the keyskeytag,algorithm,typeanddigest, with the values holding the corresponding data. The digest data should be a single unbroken string of hexadecimal digits. no spaces, no line breaks, keep it together bestie π
Example:
Zonemaster::Engine->add_fake_ds(
'nic.se' => [
{ keytag => 16696, algorithm => 5, type => 2, digest => '40079DDF8D09E7F10BB248A69B6630478A28EF969DDE399F95BC3B39F8CBACD7' },
{ keytag => 16696, algorithm => 5, type => 1, digest => 'EF5D421412A5EAF1230071AFFD4F585E3B2B1A60' },
]
);
start_time_now()β Set the logger's start time to the current time. clock reset, new era, fresh start β°β¨reset()β Reset logger start time to current time, empty the list of log messages, clear nameserver object cache, clear recursor cache and clear all cached results of MethodsV2. it's giving factory reset. it's giving brand new me. π§Όπ
π AUTHORS π
- Vincent Levigneron
<vincent.levigneron at nic.fr>β Current maintainer π - Calle Dybedahl
<calle at init.se>β Original author π
π LICENSE π
This is free software under a 2-clause BSD license. The full text of the license can be found in the LICENSE file included with this distribution. read it, bestie, it's short and it's slay. π«Ά
aaaand that's the whole page, no gatekeeping π
this was perl v5.40.1 documenting Zonema...Engine(3pm), dated 2026-03-21 β mwah, periodt, go check some DNS zones πβ¨ππ¦
π¦ 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