Net::IANA::TLD - IANA TLDs database
Version 0.02
IANA TLDs database
use Net::IANA::TLD; # for each new(), the latest TLD data will be downloaded from IANA's website # you should cache the object my $tld = Net::IANA::TLD->new(); print $tld->version, "\n"; print $tld->date, "\n"; print $tld->size, "\n"; # validate if a given TLD exists my $given_tld = "com"; print "The TLD $given_tld exists\n" if $tld->has_tld($given_tld); # dump all tlds use Data::Dumper; my $hash_ref = $tld->tlds; print Dumper $hash_ref;
my $tld = Net::IANA::TLD->new();
$tld->version;
$tld->date;
$tld->size;
# fetch all tlds my $hash_ref = $tld->tlds;
# return undef if given tld not exists my $res = $tld->has_tld($given_tld);
Wesley Peng, <wesley at cpan.org>
<wesley at cpan.org>
Please report any bugs or feature requests to bug-net-iana-tld at rt.cpan.org, or through the web interface at https://rt.cpan.org/NoAuth/ReportBug.html?Queue=Net-IANA-TLD. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
bug-net-iana-tld at rt.cpan.org
You can find documentation for this module with the perldoc command.
perldoc Net::IANA::TLD
You can also look for information at:
RT: CPAN's request tracker (report bugs here)
https://rt.cpan.org/NoAuth/Bugs.html?Dist=Net-IANA-TLD
CPAN Ratings
https://cpanratings.perl.org/d/Net-IANA-TLD
Search CPAN
https://metacpan.org/release/Net-IANA-TLD
This software is Copyright (c) 2020 by Wesley Peng.
This is free software, licensed under:
The Artistic License 2.0 (GPL Compatible)
To install Net::IANA::TLD, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Net::IANA::TLD
CPAN shell
perl -MCPAN -e shell install Net::IANA::TLD
For more information on module installation, please visit the detailed CPAN module installation guide.