NAME

Data::DNS::TLD - an object representing a top-level domain.

VERSION

version 0.01

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

Data::DNS::TLD objects represent top-level domains in the DNS root zone. To instantiate an instance, use the get() method of Data::DNS.

Data::DNS::TLD inherits from Net::DNS::Domain, so all of its methods are also available.

OBJECT METHODS

type()

This method returns one of the following:

  • Data::DNS::TLD::TYPE_GTLD - the TLD is a "generic" TLD.

  • Data::DNS::TLD::TYPE_SPONSORED - the TLD is a "sponsored" TLD.

  • Data::DNS::TLD::TYPE_INFRA - the TLD is an "infrastructure" TLD.

  • Data::DNS::TLD::TYPE_CCTLD - the TLD is a "country-code" TLD.

rdap_record()

This methods queries the IANA RDAP server and returns a Net::RDAP::Object::Domain object for the TLD.

gtld_record()

This method queries the ICANN gTLD database and returns a ICANN::gTLD object for the TLD. This method will return undef if the TLD is not a gTLD.

rdap_server()

This method returns a Net::RDAP::Service object corresponding to the RDAP Base URL registered with IANA (if any).

top_domain()

This method uses Data::Tranco to find the most "popular" domain name within the TLD.

top_domains($count)

This method uses Data::Tranco to find the $count most "popular" domain names within the TLD.

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.