NAME

Data::DNS - An interface to the DNS root zone database.

VERSION

version 0.02

SYNOPSIS

use Data::DNS;

if (Data::DNS->exists("org")) {
    $org = Data::DNS->get("org");

    say ".org is operated by ".$org->rdap_record->registrant->jcard->first('org')->value;
}

DESCRIPTION

Information about the DNS root zone is distributed across multiple data sources. This module organises this information and provides a single entry point to it.

Note: the DNS root zone is not static, and TLDs are created and removed regularly. It should not be assumed that the data elements provided by this module will never change.

PACKAGE METHODS

exists($tld)

This method returns true if the TLD specified by $tld exists in the root zone.

get($tld)

This method returns a Data::DNS::TLD object corresponding to the TLD specified by $tld. An exception will be thrown if the TLD does not exist.

all()

This methods returns an array of Data::DNS::TLD objects for all current TLDs.

AUTHOR

Gavin Brown <gavin.brown@icann.org>

COPYRIGHT AND LICENSE

This software is copyright (c) 2025 by Internet Corporation for Assigned Names and Numbers (ICANN).

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.