Prevent a "Use of implicit split" warning

In the helo plugin. Full warn is:
Use of implicit split to @_ is deprecated at /usr/share/qpsmtpd/plugins/helo line 524
This commit is contained in:
Daniel Berteaud 2016-04-19 18:18:03 +02:00
parent 43020a8041
commit e792c11bfa

View File

@ -521,7 +521,8 @@ sub check_name_match {
my ($dns_name, $helo_name) = @_; my ($dns_name, $helo_name) = @_;
return if !$dns_name; return if !$dns_name;
return if split(/\./, $dns_name) < 2; # not a FQDN my @dots = split(/\./, $dns_name);
return if scalar @dots < 2; # not a FQDN
if ($dns_name eq $helo_name) { if ($dns_name eq $helo_name) {
$self->log(LOGDEBUG, "reverse name match"); $self->log(LOGDEBUG, "reverse name match");