1Net::Domain::TLD(3)   User Contributed Perl Documentation  Net::Domain::TLD(3)
2
3
4

NAME

6         Net::Domain::TLD - Work with TLD names
7

SYNOPSIS

9         use Net::Domain::TLD qw(tlds tld_exists);
10         my @ccTLDs = tlds('cc');
11         print "TLD ok\n" if tld_exists('ac','cc');
12

DESCRIPTION

14         The purpose of this module is to provide user with current list of
15         available top level domain names including new ICANN additions and ccTLDs
16         Currently TLD definitions have been acquired from the following sources:
17
18         http://www.icann.org/tlds/
19         http://www.dnso.org/constituency/gtld/gtld.html
20         http://www.iana.org/cctld/cctld-whois.htm
21         https://www.iana.org/domains/root/db
22

PUBLIC METHODS

24         Each public function/method is described here.
25         These are how you should interact with this module.
26
27       "tlds"
28
29         This routine returns the tlds requested.
30
31         my @all_tlds = tlds; #array of tlds
32         my $all_tlds = tlds; #hashref of tlds and their descriptions
33
34         my @cc_tlds = tlds('cc'); #array of just 'cc' type tlds
35         my $cc_tlds = tlds('cc'); #hashref of just 'cc' type tlds and their descriptions
36
37         Valid types are:
38           cc                 - country code domains
39           ccidn              - internationalized country code top-level domain
40           gtld_open          - generic domains that anyone can register
41           gtld_restricted    - generic restricted registration domains
42           gtld_new           - new gTLDs
43           new_open           - recently added generic domains
44           new_restricted     - new restricted registration domains
45           reserved           - RFC2606 restricted names, not returned by tlds
46
47       "tld_exists"
48
49         This routine returns true if the given domain exists and false otherwise.
50
51         die "no such domain" unless tld_exists($tld); #call without tld type
52         die "no such domain" unless tld_exists($tld, 'new_open'); #call with tld type
53
55         Copyright (c) 2003-2016 Alex Pavlovic, all rights reserved.  This program
56         is free software; you can redistribute it and/or modify it under the same terms
57         as Perl itself.
58

AUTHORS

60         Alexander Pavlovic <alex.pavlovic@devradius.com>
61         Ricardo SIGNES <rjbs@cpan.org>
62
63
64
65perl v5.34.0                      2022-01-21               Net::Domain::TLD(3)
Impressum