Zonema...nstants(3pm)

πŸ’– NAME πŸ’–

Zonemaster::Engine::Constants β€” okay bestie, this is the module that holds all the constants used in the Test modules. It's the little treasure chest of numbers and flags that the rest of the thing keeps pulling out. ✨


🌸 SYNOPSIS 🌸

Like, this is literally how you summon all of it at once:

use Zonemaster::Engine::Constants ':all';

πŸŽ€ EXPORTED GROUPS πŸŽ€

These are the lil friend groups of constants β€” you can pull in a whole squad by name instead of one at a time. 🫢

  • all β€” every exportable name. The whole girlband. πŸ‘‘
  • algo β€” DNSSEC algorithms.
  • cname β€” CNAME records.
  • name β€” label and name lengths.
  • ip β€” IP version constants.
  • soa β€” SOA values limits.
  • misc β€” other, uncategorized export names, e.g. the UDP payload limit and the minimum number of name servers per zone.
  • addresses β€” address classes for IPv4 and IPv6.

✨ EXPORTED NAMES ✨

Not me listing every single one, because we don't skip. Every name, periodt. πŸ’…

  • $ALGO_STATUS_DEPRECATED
  • $ALGO_STATUS_PRIVATE
  • $ALGO_STATUS_RESERVED
  • $ALGO_STATUS_UNASSIGNED
  • $ALGO_STATUS_OTHER
  • $ALGO_STATUS_NOT_RECOMMENDED
  • $ALGO_STATUS_NOT_ZONE_SIGN
  • $BLACKLISTING_ENABLED β€” a boolean, used to enable the name server blacklisting mechanism.
  • $CNAME_MAX_CHAIN_LENGTH β€” an integer, used to define the maximum length of a CNAME chain when doing consecutive recursive lookups.
  • $CNAME_MAX_RECORDS β€” an integer, used to define the maximum number of CNAME records in a response.
  • $DURATION_5_MINUTES_IN_SECONDS
  • $DURATION_1_HOUR_IN_SECONDS
  • $DURATION_4_HOURS_IN_SECONDS
  • $DURATION_12_HOURS_IN_SECONDS
  • $DURATION_1_DAY_IN_SECONDS
  • $DURATION_1_WEEK_IN_SECONDS
  • $DURATION_180_DAYS_IN_SECONDS
  • $FQDN_MAX_LENGTH
  • $LABEL_MAX_LENGTH
  • $IP_VERSION_4
  • $IP_VERSION_6
  • $SERIAL_BITS β€” an integer, used to define the size of the serial number space, as defined in RFC1982, section 2.
  • $SERIAL_MAX_VARIATION
  • $MINIMUM_NUMBER_OF_NAMESERVERS
  • $UDP_PAYLOAD_LIMIT
  • $EDNS_UDP_PAYLOAD_DEFAULT β€” an integer, used to define the EDNS0 UDP packet size in non-DNSSEC EDNS queries.
  • $EDNS_UDP_PAYLOAD_COMMON_LIMIT
  • $EDNS_UDP_PAYLOAD_DNSSEC_DEFAULT β€” an integer, used to define the EDNS0 UDP packet size in DNSSEC queries.
  • @IPV4_SPECIAL_ADDRESSES
  • @IPV6_SPECIAL_ADDRESSES

πŸ¦‹ METHODS πŸ¦‹

🌈 _extract_iana_ip_blocks()

Okay so check it:

my @array = _extract_iana_ip_blocks( $ip_version );

This is an internal method that's used to extract IP blocks details from IANA files for a given IP version (i.e. 4 or 6). Bestie it takes an integer (the IP version), that's the vibe.

It returns a list of hashes β€” and the keys of those hashes are:

  • ip (a Net::IP::XS object)
  • name (string)
  • reference (string)
  • globally_reachable (string)

Like, four keys, all slaying in their own lane. πŸ’œ


That's the whole page, no cap. This iconic little doc shipped with perl v5.40.1, dated 2026-03-21, and it lives in the User Contributed Perl Documentation β€” thanks for reading my Ted Talk, ily, bye πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from