From be67f02dd8ffca881d19a656491bb81e07223f42 Mon Sep 17 00:00:00 2001 From: Matt Sergeant Date: Thu, 11 Jan 2007 23:52:51 +0000 Subject: [PATCH] Fix tests (idea from Guy Hulbert, with tweak from me). git-svn-id: https://svn.perl.org/qpsmtpd/branches/0.3x@706 958fd67b-6ff1-0310-b445-bb7760255be9 --- lib/Qpsmtpd.pm | 4 +--- t/Test/Qpsmtpd.pm | 4 ++-- 2 files changed, 3 insertions(+), 5 deletions(-) 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 {