Scroll to navigation

Zonemaster::Engine::Util(3pm) User Contributed Perl Documentation Zonemaster::Engine::Util(3pm)

NAME

Zonemaster::Engine::Util - utility functions for other Zonemaster modules

SYNOPSIS

    use Zonemaster::Engine::Util;
    info(TAG => { some => 'argument'});
    my $ns = ns($name, $address);
    my $name = name('whatever.example.org');

EXPORTED FUNCTIONS

Creates and returns a Zonemaster::Engine::Logger::Entry object. The object is also added to the global logger object's list of entries.
Creates and returns a nameserver object with the given name and address.
Creates and returns a Zonemaster::Engine::DNSName object for the given argument.
Parses a string in the root hints format into the format expected by Zonemaster::Engine::Resolver->add_fake_addresses().

Returns a hashref with domain names as keys and arrayrefs to IP addresses as values.

Throws an exception if the inputs is not valid root hints text.

A root hints file is a valid RFC 1035 zone file of the same type IANA publishes to be used as hint file for name servers <https://www.internic.net/domain/named.root>.

In addition to being valid zone file the following restrictions are imposed on the root hints format:

  • The file must not contain any $TTL, $ORIGIN, $INCLUDE or $GENERATE directives.
  • The class field of all records must be "IN" or absent. If class is absent, IN is assumed.
  • The TTL field may be absent or present. The TTL value is ignored.
  • The RR type of all DNS records must be NS, A or AAAA.
  • The file must contain at least one NS record.
  • The owner name of all NS records must be ".".
  • For every NS record there must be at least one address record (A or AAAA) whose owner name is identical to the domain name in the RDATA of the NS record.
  • All address records (A or AAAA) must have an owner name that is identical to the domain name in the RDATA of some NS record in the zone.
Return a boolean.
This routine provides a special effect: sCraMBliNg tHe CaSe
Check if a test is blacklisted and should run or not.
Check if IP version operations are permitted. Tests are done against Zonemaster::Engine::Profile->effective content.
WIP, here to please Pod::Coverage.
2024-04-22 perl v5.38.2