Subject: | tldcheck not compatible with current Net::Domain::TLD (1.65 25 Jan 2006) |
Email::Valid->address( -address => $testmail, -tldcheck => 1 );
gives error:
Can't locate object method "new" via package "Net::Domain::TLD"
This module's code for Net::Domain::TLD must be for an older version.
Current code in Valid.pm
==================
Line 20:
$TLD = Net::Domain::TLD->new if defined $Net::Domain::TLD::VERSION;
Lines 167 - 174:
if (!defined $TLD) {
require Net::Domain::TLD;
$TLD = Net::Domain::TLD->new;
}
my $host = $self->_host( $args{address} or return $self->details
('tld') );
$host =~ m#\.(\w+)$#;
$TLD->exists( $1 );
================
Code that uses Net::Domain:TLD 1.65 25 Jan 2006 would be:
================
Line 20: omit
Lines 167 - 174:
use Net::Domain::TLD qw(tld_exists);
my $host = $self->_host( $args{address} or return $self->details
('tld') );
$host =~ m#\.(\w+)$#;
tld_exists( $1 ) or return $self->details('tld');
================
Perhaps the line
use Net::Domain::TLD qw(tld_exists);
would be better at the top, with the other "use" statements.
Sorry, I don't know how to create a patch.