Skip Menu |

This queue is for tickets about the Data-Validate-Domain CPAN distribution.

Report information
The Basics
Id: 72312
Status: rejected
Priority: 0/
Queue: Data-Validate-Domain

People
Owner: Nobody in particular
Requestors: dionys [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: is_domain() not supports IDN
is_domain() function returns false on IDNs.
This isn't a bug in this module, but a result of an old version of Net::Domain::TLD. Net::Domain::TLD 1.73 (and possibly earlier) supports IDNs which means in turn that Data::Validate::Domain's is_domain() does. use feature qw(say); use Net::Domain::TLD qw(tld_exists); use Data::Validate::Domain qw(is_domain); my $uri = "http://xn--p8j9a0d9c9a.xn--q9jyb4c/index.html"; my $domain = "xn--p8j9a0d9c9a.xn--q9jyb4c"; my $tld = "xn--q9jyb4c"; say "Net::Domain::TLD::VERSION: $Net::Domain::TLD::VERSION"; say "Data::Validate::Domain::VERSION: $Data::Validate::Domain::VERSION"; say "tld_exists: " . tld_exists($tld); say "is_domain: " . is_domain( $domain, { 'domain_allow_underscore' => 1, 'domain_private_tld' => qr/^[a-z0-9]+$/, } ) // "Not defined"; __END__ Outputs: Net::Domain::TLD::VERSION: 1.72 Data::Validate::Domain::VERSION: 0.10 tld_exists: 1 is_domain: xn--p8j9a0d9c9a.xn--q9jyb4c and: Net::Domain::TLD::VERSION: 1.69 Data::Validate::Domain::VERSION: 0.10 tld_exists: 0 is_domain:
This isn't a bug in this module, but a result of an old version of Net::Domain::TLD. Net::Domain::TLD 1.73 (and possibly earlier) supports IDNs which means in turn that Data::Validate::Domain's is_domain() does. use feature qw(say); use Net::Domain::TLD qw(tld_exists); use Data::Validate::Domain qw(is_domain); my $uri = "http://xn--p8j9a0d9c9a.xn--q9jyb4c/index.html"; my $domain = "xn--p8j9a0d9c9a.xn--q9jyb4c"; my $tld = "xn--q9jyb4c"; say "Net::Domain::TLD::VERSION: $Net::Domain::TLD::VERSION"; say "Data::Validate::Domain::VERSION: $Data::Validate::Domain::VERSION"; say "tld_exists: " . tld_exists($tld); say "is_domain: " . is_domain( $domain, { 'domain_allow_underscore' => 1, 'domain_private_tld' => qr/^[a-z0-9]+$/, } ) // "Not defined"; __END__ Outputs: Net::Domain::TLD::VERSION: 1.72 Data::Validate::Domain::VERSION: 0.10 tld_exists: 1 is_domain: xn--p8j9a0d9c9a.xn--q9jyb4c and: Net::Domain::TLD::VERSION: 1.69 Data::Validate::Domain::VERSION: 0.10 tld_exists: 0 is_domain:
Срд Апр 08 00:58:17 2015, JARICH писал: Show quoted text
> This isn't a bug in this module, but a result of an old version of > Net::Domain::TLD. Net::Domain::TLD 1.73 (and possibly earlier) > supports IDNs which means in turn that Data::Validate::Domain's > is_domain() does.
Yes. The IDN TLDs has been added in Net::Domain::TLD 1.70 one and half year ago. And this bug 4 is already years old.
Closing this out then. Thanks.