diff --git a/lib/Qpsmtpd.pm b/lib/Qpsmtpd.pm index d262518..ac6c70c 100644 --- a/lib/Qpsmtpd.pm +++ b/lib/Qpsmtpd.pm @@ -274,7 +274,6 @@ sub _load_plugin { my $self = shift; my ($plugin_line, @plugin_dirs) = @_; - my @ret; my ($plugin, @args) = split ' ', $plugin_line; my $package; @@ -330,9 +329,8 @@ sub _load_plugin { my $plug = $package->new(); $plug->_register($self, @args); - push @ret, $plug; - return @ret; + return $plug; } sub transaction { diff --git a/t/Test/Qpsmtpd.pm b/t/Test/Qpsmtpd.pm index b547d58..80ab6ce 100644 --- a/t/Test/Qpsmtpd.pm +++ b/t/Test/Qpsmtpd.pm @@ -70,8 +70,8 @@ sub config_dir { './config.sample'; } -sub plugin_dir { - './plugins'; +sub plugin_dirs { + ('./plugins'); } sub log {