.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Pod::Man 5.01 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. .ie n \{\ . ds C` "" . ds C' "" 'br\} .el\{\ . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "Zonemaster::Engine::Test::Zone 3pm" .TH Zonemaster::Engine::Test::Zone 3pm 2024-04-22 "perl v5.38.2" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH NAME Zonemaster::Engine::Test::Zone \- Module implementing tests focused on the DNS zone content, such as SOA and MX records .SH SYNOPSIS .IX Header "SYNOPSIS" .Vb 1 \& my @results = Zonemaster::Engine::Test::Zone\->all( $zone ); .Ve .SH METHODS .IX Header "METHODS" .IP \fBall()\fR 4 .IX Item "all()" .Vb 1 \& my @logentry_array = all( $zone ); .Ve .Sp Runs the default set of tests for that module, i.e. between eight and ten tests depending on the tested zone. .Sp Takes a Zonemaster::Engine::Zone object. .Sp Returns a list of Zonemaster::Engine::Logger::Entry objects. .IP \fBmetadata()\fR 4 .IX Item "metadata()" .Vb 1 \& my $hash_ref = metadata(); .Ve .Sp Returns a reference to a hash, the keys of which are the names of all Test Cases in the module, and the corresponding values are references to an array containing all the message tags that the Test Case can use in log entries. .IP \fBtag_descriptions()\fR 4 .IX Item "tag_descriptions()" .Vb 1 \& my $hash_ref = tag_descriptions(); .Ve .Sp Used by the built-in translation system. .Sp Returns a reference to a hash, the keys of which are the message tags and the corresponding values are strings (message IDs). .IP \fBversion()\fR 4 .IX Item "version()" .Vb 1 \& my $version_string = version(); .Ve .Sp Returns a string containing the version of the current module. .SH "INTERNAL METHODS" .IX Header "INTERNAL METHODS" .IP \fB_emit_log()\fR 4 .IX Item "_emit_log()" .Vb 1 \& my $log_entry = _emit_log( $message_tag_string, $hash_ref ); .Ve .Sp Adds a message to the logger for this module. See "add($tag, \f(CW$argref\fR, \f(CW$module\fR, \f(CW$testcase\fR)" in Zonemaster::Engine::Logger::Entry for more details. .Sp Takes a string (message tag) and a reference to a hash (arguments). .Sp Returns a Zonemaster::Engine::Logger::Entry object. .IP \fB_ip_disabled_message()\fR 4 .IX Item "_ip_disabled_message()" .Vb 1 \& my $bool = _ip_disabled_message( $logentry_array_ref, $ns, @query_type_string ); .Ve .Sp Checks if the IP version of a given name server is allowed to be queried. If not, it adds a logging message and returns true. Else, it returns false. .Sp Takes a reference to an array of Zonemaster::Engine::Logger::Entry objects, a Zonemaster::Engine::Nameserver object and an array of strings (query type). .Sp Returns a boolean. .IP \fB_retrieve_record_from_zone()\fR 4 .IX Item "_retrieve_record_from_zone()" .Vb 1 \& my $packet = _retrieve_record_from_zone( $logentry_array_ref, $zone, $name, $query_type_string ); .Ve .Sp Retrieves resource records of given type for the given name from the response of the first authoritative server of the given zone that has at least one. Used as an helper function for Test Cases Zone02 to Zone07. .Sp Takes a reference to an array of Zonemaster::Engine::Logger::Entry objects, a Zonemaster::Engine::Zone object, a Zonemaster::Engine::DNSName object and a string (query type). .Sp Returns a Zonemaster::Engine::Packet object, or \f(CW\*(C`undef\*(C'\fR. .IP \fB_spf_syntax_ok()\fR 4 .IX Item "_spf_syntax_ok()" .Vb 1 \& _spf_syntax_ok( $spf_string ); .Ve .Sp Attempts to run "new_from_string($text, \f(CW%options\fR)" in Mail::SPF::v1::Record on the provided string. .Sp Takes a string (SPF text). .SH TESTS .IX Header "TESTS" .IP \fBzone01()\fR 4 .IX Item "zone01()" .Vb 1 \& my @logentry_array = zone01( $zone ); .Ve .Sp Runs the Zone01 Test Case . .Sp Takes a Zonemaster::Engine::Zone object. .Sp Returns a list of Zonemaster::Engine::Logger::Entry objects. .IP \fBzone02()\fR 4 .IX Item "zone02()" .Vb 1 \& my @logentry_array = zone02( $zone ); .Ve .Sp Runs the Zone02 Test Case . .Sp Takes a Zonemaster::Engine::Zone object. .Sp Returns a list of Zonemaster::Engine::Logger::Entry objects. .IP \fBzone03()\fR 4 .IX Item "zone03()" .Vb 1 \& my @logentry_array = zone03( $zone ); .Ve .Sp Runs the Zone03 Test Case . .Sp Takes a Zonemaster::Engine::Zone object. .Sp Returns a list of Zonemaster::Engine::Logger::Entry objects. .IP \fBzone04()\fR 4 .IX Item "zone04()" .Vb 1 \& my @logentry_array = zone04( $zone ); .Ve .Sp Runs the Zone04 Test Case . .Sp Takes a Zonemaster::Engine::Zone object. .Sp Returns a list of Zonemaster::Engine::Logger::Entry objects. .IP \fBzone05()\fR 4 .IX Item "zone05()" .Vb 1 \& my @logentry_array = zone05( $zone ); .Ve .Sp Runs the Zone05 Test Case . .Sp Takes a Zonemaster::Engine::Zone object. .Sp Returns a list of Zonemaster::Engine::Logger::Entry objects. .IP \fBzone06()\fR 4 .IX Item "zone06()" .Vb 1 \& my @logentry_array = zone06( $zone ); .Ve .Sp Runs the Zone06 Test Case . .Sp Takes a Zonemaster::Engine::Zone object. .Sp Returns a list of Zonemaster::Engine::Logger::Entry objects. .IP \fBzone07()\fR 4 .IX Item "zone07()" .Vb 1 \& my @logentry_array = zone07( $zone ); .Ve .Sp Runs the Zone07 Test Case . .Sp Takes a Zonemaster::Engine::Zone object. .Sp Returns a list of Zonemaster::Engine::Logger::Entry objects. .IP \fBzone08()\fR 4 .IX Item "zone08()" .Vb 1 \& my @logentry_array = zone08( $zone ); .Ve .Sp Runs the Zone08 Test Case . .Sp Takes a Zonemaster::Engine::Zone object. .Sp Returns a list of Zonemaster::Engine::Logger::Entry objects. .IP \fBzone09()\fR 4 .IX Item "zone09()" .Vb 1 \& my @logentry_array = zone09( $zone ); .Ve .Sp Runs the Zone09 Test Case . .Sp Takes a Zonemaster::Engine::Zone object. .Sp Returns a list of Zonemaster::Engine::Logger::Entry objects. .IP \fBzone10()\fR 4 .IX Item "zone10()" .Vb 1 \& my @logentry_array = zone10( $zone ); .Ve .Sp Runs the Zone10 Test Case . .Sp Takes a Zonemaster::Engine::Zone object. .Sp Returns a list of Zonemaster::Engine::Logger::Entry objects. .IP \fBzone11()\fR 4 .IX Item "zone11()" .Vb 1 \& my @logentry_array = zone11( $zone ); .Ve .Sp Runs the Zone11 Test Case . .Sp Takes a Zonemaster::Engine::Zone object. .Sp Returns a list of Zonemaster::Engine::Logger::Entry objects.