Net::Domain::TLD(3) User Contributed Perl Documentation Net::Domain::TLD(3)
NNAAMMEE
Net::Domain::TLD - Work with TLD names
SSYYNNOOPPSSIISS
use Net::Domain::TLD qw(tlds tld_exists);
my @ccTLDs = tlds('cc');
print "TLD ok\n" if tld_exists('ac');
DDEESSCCRRIIPPTTIIOONN
The purpose of this module is to provide user with current list of
available top level domain names including new ICANN additions and ccTLDs
Currently TLD definitions have been acquired from the following sources:
http://www.icann.org/tlds/
http://www.dnso.org/constituency/gtld/gtld.html
http://www.iana.org/cctld/cctld-whois.htm
PPUUBBLLIICC MMEETTHHOODDSS
Each public function/method is described here.
These are how you should interact with this module.
_"_t_l_d_s_"
my @all_tlds = tlds; #array of tlds
my $all_tlds = tlds; #hashref of tlds and their descriptions
my @cc_tlds = tlds('cc'); #array of just 'cc' type tlds
my $cc_tlds = tlds('cc'); #hashref of just 'cc' type tlds and their descriptions
Valid types are:
cc - country code domains
gtld_open - generic domains that anyone can register
gtld_restricted - generic restricted registration domains
new_open - recently added generic domains
new_restricted - new restricted registration domains
_"_t_l_d___e_x_i_s_t_s_"
die "no such domain" unless tld_exists($tld);
die "no such domain" unless tld_exists($tld, 'cc');
This routine returns true if the given domain exists and false if it does not.
CCOOPPYYRRIIGGHHTT
Copyright (c) 2003-2005 Alex Pavlovic, all rights reserved. This program
is free software; you can redistribute it and/or modify it under the same terms
as Perl itself.
AAUUTTHHOORRSS
Alexander Pavlovic C<< <alex.pavlovic@taskforce-1.com> >>
Ricardo SIGNES C<< <rjbs@cpan.org> >>
perl v5.8.7 2006-01-25 Net::Domain::TLD(3)