Avoid warnings for Qpsmtpd::Address->new(undef)

This commit is contained in:
Jared Johnson 2014-12-30 13:37:14 -06:00
parent 562fa951d0
commit ba659461b5

View File

@ -56,7 +56,10 @@ use overload (
sub new { sub new {
my ($class, $user, $host) = @_; my ($class, $user, $host) = @_;
my $self = {}; my $self = {};
if ($user =~ /^<(.*)>$/) { if (! defined $user) {
# Do nothing
}
elsif ($user =~ /^<(.*)>$/) {
($user, $host) = $class->canonify($user); ($user, $host) = $class->canonify($user);
return if !defined $user; return if !defined $user;
} }