Control: reassign -1 libnet-domain-tld-perl 1.75-3
Control: affects -1 lintian libdata-validate-domain-perl
Control: retitle -1 libnet-domain-tld-perl: does not know about 'fun' TLD
Control: forwarded -1 https://rt.cpan.org/Public/Bug/Display.html?id=122099
Control: tag -1 + confirmed upstream

On Mon, 29 Jul 2024 19:44:23 +0900, Mattia Rizzolo wrote:

> This is actually a bug in the validation library (that looking at it now
> I see it's quite outdated compared to upstream version).
> 
> See for example:
> 
> perl -M'Data::Valizdate::Domain' -e 'is_domain("[email protected]") || 
> print("domain invalid");'
 
Data::Validate::Domain uses Net::Domain::TLD (libnet-domain-tld-perl)
to check the TLD, and Net::Domain::TLD doesn't know about the 'fun'
TLD.

According to https://metacpan.org/pod/Data::Validate::Domain it
should be possible the disable the TLD check but this is probably a
bad idea and doesn't work for me right now:

% perl -MData::Validate::Domain -E 'say "domain invalid" unless 
is_domain("[email protected]");'         
domain invalid

% perl -MData::Validate::Domain -E 'say "domain invalid" unless 
is_domain("[email protected]", {domain_disable_tld_validation => 1});'
domain invalid

(Ah, this was added in 0.13. D'oh.)

What works is to teach it about "fun" but this obviously doesn't
scale:

% perl -MData::Validate::Domain -E 'say "domain invalid" unless 
is_domain("[email protected]", {domain_private_tld => {fun=>1}});'
[no output]



Anyway, in the end 'fun' is missing from
/usr/share/perl5/Net/Domain/TLD.pm, hence reassigning to
libnet-domain-tld-perl. And there's even a 7 year old upstream ticket
about it: https://rt.cpan.org/Public/Bug/Display.html?id=122099


Cheers,
gregor

-- 
 .''`.  https://info.comodo.priv.at -- Debian Developer https://www.debian.org
 : :' : OpenPGP fingerprint D1E1 316E 93A7 60A8 104D  85FA BB3A 6801 8649 AA06
 `. `'  Member VIBE!AT & SPI Inc. -- Supporter Free Software Foundation Europe
   `-   

Attachment: signature.asc
Description: Digital Signature

Reply via email to