From cee48141b5c296973114e79479f3dc5ec264bf72 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dagfinn=20Ilmari=20Manns=C3=A5ker?= Date: Sun, 29 Sep 2013 21:53:49 +0100 Subject: Fix execute context in Reply::Plugin::Timer Otherwise it breaks calling anything that returns a list. Also, the Reply::Plugin documentation says the execute method "returns the list of results returned by calling the coderef." --- lib/Reply/Plugin/Timer.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Reply/Plugin/Timer.pm b/lib/Reply/Plugin/Timer.pm index a3ec247..148d874 100644 --- a/lib/Reply/Plugin/Timer.pm +++ b/lib/Reply/Plugin/Timer.pm @@ -35,7 +35,7 @@ sub execute { my ($self, $next, @args) = @_; my $t0 = [gettimeofday]; - my $ret = $next->(@args); + my @ret = $next->(@args); my $elapsed = tv_interval($t0); if ($elapsed > $self->{mintime}) { @@ -46,7 +46,7 @@ sub execute { } } - return $ret; + return @ret; } 1; -- cgit v1.2.3