Subject: | Problem in _host function of Email::Valid |
Date: | Mon, 23 Jun 2008 13:09:17 +0200 |
To: | bug-Email-Valid [...] rt.cpan.org |
From: | Anneke Treep <anneke [...] echelon.nl> |
Dear developer,
Today I came across a problem in the _host function of the Email::Valid
module.
My source:
use Email::Valid;
my $err = { Email::Valid->address(-address => 'mail@-domain.de',
-mxcheck => 1) };
yields the following on STDERR:
Use of uninitialized value in pattern match (m//) at
/usr/share/perl5/Email/Valid.pm line 206.
Use of uninitialized value in substitution (s///) at
/usr/share/perl5/Email/Valid.pm line 207.
Use of uninitialized value in substitution (s///) at
/usr/share/perl5/Email/Valid.pm line 215.
As far as I can tell, this is due to the fact that in the _host-function
the scalar $addr is assigned to as follows:
$addr = $addr->address if UNIVERSAL::isa($addr, 'Mail::Address');
but then no checks are done to see if $addr has been given a value so
that the pattern matches/subtitutes make sense.
I suppose it shouldn't be too hard to correct this.
Many thanks in advance for your work!
Greetings,
Anneke Treep
Echelon BV, Enschede, NL