From e197b3e80a9a19c0deec05a6632135d842d790ef Mon Sep 17 00:00:00 2001 From: John Barrett Date: Sun, 23 Aug 2015 22:55:27 +0100 Subject: If @results contains only one value, just dump that value --- lib/Reply/Plugin/DataPrinter.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/Reply/Plugin/DataPrinter.pm b/lib/Reply/Plugin/DataPrinter.pm index 1700d0a..1fea3ab 100644 --- a/lib/Reply/Plugin/DataPrinter.pm +++ b/lib/Reply/Plugin/DataPrinter.pm @@ -21,7 +21,8 @@ This plugin uses L to format results. sub mangle_result { my ($self, @result) = @_; return unless @result; - return p(@result, return_value => 'dump'); + ( @result == 1 ) && return p($result[0]); + return p(@result); } 1; -- cgit v1.2.3-54-g00ecf