Package: libnet-domain-tld-perl
Version: 1.75-4
Severity: wishlist
Hi,
I use Net::Domain::TLD via Email::Valid and it's handy. But I noticed it
hasn't gotten an upstream update lately and I found myself wondering if
there have been new TLDs added it doesn't know about. I do see the
debian package has added some when people notice. But I wanted to see
how it compared to ICANN. So I came up with the following (rough) process:
# Get the ICANN list
curl https://data.iana.org/TLD/tlds-alpha-by-domain.txt
# Get the debian TLD.pm
curl https://salsa.debian.org/perl-team/modules/packages/libnet-domain-tld-perl/-/raw/master/lib/Net/Domain/TLD.pm
# extract the TLDs, uppercase, sort and uniq
grep ' => q' TLD.pm |awk -F\' '{print $2}' |tr [:lower:] [:upper:] |sort -u >TLS.upper
# List those things only in ICANN
comm -13 TLD.upper tlds-alpha-by-domain.txt > only-ICANN
# List those things only in TLD.pm
comm -23 TLD.upper tlds-alpha-by-domain.txt > only-TLDpm
It does OK, but can't handle some things. But it does reveal quite a few
things that are only in one or the other. A good diff tool helps too.
For things in ICANN and not in TLD.pm, could they be added? Or if there
is a reason to not add then document why they don't include it.
For things in TLD.pm and not in ICANN, could the reason be documented (or
removed if it now longer makes sense to have them)?
I guess it would also be nice if this was done upstream as well, rather
than just in the debian package, if that was somehow possible.
Thanks,
--
Matt Taggart
tagg…@riseup.net