geoip: added named array for invalid args

so it passes Perl::Critic tests
This commit is contained in:
Matt Simerson 2013-12-18 00:02:07 -05:00
parent 96dfb08d87
commit a4695cec8b

View File

@ -116,10 +116,10 @@ use Qpsmtpd::Constants;
#use Math::Trig; # eval'ed in set_distance_gc #use Math::Trig; # eval'ed in set_distance_gc
sub register { sub register {
my ($self, $qp) = shift, shift; my ($self, $qp, @args) = @_;
$self->log(LOGERROR, "Bad arguments") if @_ % 2; $self->log(LOGERROR, "Bad arguments") if @args % 2;
$self->{_args} = {@_}; $self->{_args} = {@args};
$self->{_args}{db_dir} ||= '/usr/local/share/GeoIP'; $self->{_args}{db_dir} ||= '/usr/local/share/GeoIP';
eval 'use Geo::IP'; eval 'use Geo::IP';