diff options
author | Dagfinn Ilmari Mannsåker <ilmari@ilmari.org> | 2013-09-29 21:53:49 +0100 |
---|---|---|
committer | Dagfinn Ilmari Mannsåker <ilmari@ilmari.org> | 2013-09-29 21:55:20 +0100 |
commit | cee48141b5c296973114e79479f3dc5ec264bf72 (patch) | |
tree | 14d473d37423026ce5740187f7899c8b409d51ec /lib/Reply/Plugin/Timer.pm | |
parent | 7989b47c92e7dbd6f43114d8e43aff8c31f79584 (diff) | |
download | reply-cee48141b5c296973114e79479f3dc5ec264bf72.tar.gz reply-cee48141b5c296973114e79479f3dc5ec264bf72.zip |
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."
Diffstat (limited to 'lib/Reply/Plugin/Timer.pm')
-rw-r--r-- | lib/Reply/Plugin/Timer.pm | 4 |
1 files 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; |