.\" Automatically generated by Pod::Man 4.14 (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 .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . 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::Util 3pm" .TH Zonemaster::Engine::Util 3pm "2023-03-04" "perl v5.36.0" "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::Util \- utility functions for other Zonemaster modules .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 4 \& use Zonemaster::Engine::Util; \& info(TAG => { some => \*(Aqargument\*(Aq}); \& my $ns = ns($name, $address); \& my $name = name(\*(Aqwhatever.example.org\*(Aq); .Ve .SH "EXPORTED FUNCTIONS" .IX Header "EXPORTED FUNCTIONS" .ie n .IP "info($tag, $href)" 4 .el .IP "info($tag, \f(CW$href\fR)" 4 .IX Item "info($tag, $href)" Creates and returns a Zonemaster::Engine::Logger::Entry object. The object is also added to the global logger object's list of entries. .ie n .IP "ns($name, $address)" 4 .el .IP "ns($name, \f(CW$address\fR)" 4 .IX Item "ns($name, $address)" Creates and returns a nameserver object with the given name and address. .IP "name($string_name_or_zone)" 4 .IX Item "name($string_name_or_zone)" Creates and returns a Zonemaster::Engine::DNSName object for the given argument. .IP "parse_hints($string)" 4 .IX Item "parse_hints($string)" Parses a string in the root hints format into the format expected by Zonemaster::Engine::Resolver\->\fBadd_fake_addresses()\fR. .Sp Returns a hashref with domain names as keys and arrayrefs to \s-1IP\s0 addresses as values. .Sp Throws an exception if the inputs is not valid root hints text. .Sp A root hints file is a valid \s-1RFC 1035\s0 zone file of the same type \s-1IANA\s0 publishes to be used as hint file for name servers . .Sp In addition to being valid zone file the following restrictions are imposed on the root hints format: .RS 4 .IP "\(bu" 4 The file must not contain any \f(CW$TTL\fR, \f(CW$ORIGIN\fR, \f(CW$INCLUDE\fR or \f(CW$GENERATE\fR directives. .IP "\(bu" 4 The class field of all records must be \*(L"\s-1IN\*(R"\s0 or absent. If class is absent, \s-1IN\s0 is assumed. .IP "\(bu" 4 The \s-1TTL\s0 field may be absent or present. The \s-1TTL\s0 value is ignored. .IP "\(bu" 4 The \s-1RR\s0 type of all \s-1DNS\s0 records must be \s-1NS, A\s0 or \s-1AAAA.\s0 .IP "\(bu" 4 The file must contain at least one \s-1NS\s0 record. .IP "\(bu" 4 The owner name of all \s-1NS\s0 records must be \f(CW\*(C`.\*(C'\fR. .IP "\(bu" 4 For every \s-1NS\s0 record there must be at least one address record (A or \s-1AAAA\s0) whose owner name is identical to the domain name in the \s-1RDATA\s0 of the \s-1NS\s0 record. .IP "\(bu" 4 All address records (A or \s-1AAAA\s0) must have an owner name that is identical to the domain name in the \s-1RDATA\s0 of some \s-1NS\s0 record in the zone. .RE .RS 4 .RE .IP "pod_extract_for($testname)" 4 .IX Item "pod_extract_for($testname)" Will attempt to extract the \s-1POD\s0 documentation for the test methods in the test module for which the name is given. If it can, it returns a reference to a hash where the keys are the test method names and the values the documentation strings. .Sp This method blindly assumes that the structure of the \s-1POD\s0 is exactly like that in the Basic test module. If it's not, the results are undefined. .ie n .IP "serial_gt($serial_a, $serial_b) Checks if serial_a is greater than serial_b, according to serial number arithmetic as defined in \s-1RFC1982,\s0 section 3.2." 4 .el .IP "serial_gt($serial_a, \f(CW$serial_b\fR) Checks if serial_a is greater than serial_b, according to serial number arithmetic as defined in \s-1RFC1982,\s0 section 3.2." 4 .IX Item "serial_gt($serial_a, $serial_b) Checks if serial_a is greater than serial_b, according to serial number arithmetic as defined in RFC1982, section 3.2." Return a boolean. .IP "scramble_case" 4 .IX Item "scramble_case" This routine provides a special effect: sCraMBliNg tHe CaSe .IP "should_run_test" 4 .IX Item "should_run_test" Check if a test is blacklisted and should run or not. .IP "ipversion_ok" 4 .IX Item "ipversion_ok" Check if \s-1IP\s0 version operations are permitted. Tests are done against Zonemaster::Engine::Profile\->effective content. .IP "test_levels" 4 .IX Item "test_levels" \&\s-1WIP,\s0 here to please Pod::Coverage.