README
1NAME
2 Net::Domain::TLD - Work with TLD names
3
4SYNOPSIS
5 use Net::Domain::TLD qw(tlds tld_exists);
6 my @ccTLDs = tlds('cc');
7 print "TLD ok\n" if tld_exists('ac','cc');
8
9DESCRIPTION
10 The purpose of this module is to provide user with current list of
11 available top level domain names including new ICANN additions and ccTLDs
12 Currently TLD definitions have been acquired from the following sources:
13
14 http://www.icann.org/tlds/
15 http://www.dnso.org/constituency/gtld/gtld.html
16 http://www.iana.org/cctld/cctld-whois.htm
17 https://www.iana.org/domains/root/db
18
19PUBLIC METHODS
20 Each public function/method is described here.
21 These are how you should interact with this module.
22
23 "tlds"
24 This routine returns the tlds requested.
25
26 my @all_tlds = tlds; #array of tlds
27 my $all_tlds = tlds; #hashref of tlds and their descriptions
28
29 my @cc_tlds = tlds('cc'); #array of just 'cc' type tlds
30 my $cc_tlds = tlds('cc'); #hashref of just 'cc' type tlds and their descriptions
31
32 Valid types are:
33 cc - country code domains
34 ccidn - internationalized country code top-level domain
35 gtld_open - generic domains that anyone can register
36 gtld_restricted - generic restricted registration domains
37 gtld_new - new gTLDs
38 new_open - recently added generic domains
39 new_restricted - new restricted registration domains
40 reserved - RFC2606 restricted names, not returned by tlds
41
42 "tld_exists"
43 This routine returns true if the given domain exists and false otherwise.
44
45 die "no such domain" unless tld_exists($tld); #call without tld type
46 die "no such domain" unless tld_exists($tld, 'new_open'); #call with tld type
47
48COPYRIGHT
49 Copyright (c) 2003-2016 Alex Pavlovic, all rights reserved. This program
50 is free software; you can redistribute it and/or modify it under the same terms
51 as Perl itself.
52
53AUTHORS
54 Alexander Pavlovic <alex.pavlovic@devradius.com>
55 Ricardo SIGNES <rjbs@cpan.org>
56
57