diff options
author | John Barrett <john@jbrt.org> | 2015-08-23 22:55:27 +0100 |
---|---|---|
committer | John Barrett <john@jbrt.org> | 2015-08-23 22:55:27 +0100 |
commit | e197b3e80a9a19c0deec05a6632135d842d790ef (patch) | |
tree | c655cfd8574ed7c682b2245cc1fae489a44f1b77 | |
parent | 0ca64485e3a3b757383a408fa0d0f6703fdd0b54 (diff) | |
download | reply-e197b3e80a9a19c0deec05a6632135d842d790ef.tar.gz reply-e197b3e80a9a19c0deec05a6632135d842d790ef.zip |
If @results contains only one value, just dump that value
-rw-r--r-- | lib/Reply/Plugin/DataPrinter.pm | 3 |
1 files changed, 2 insertions, 1 deletions
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<Data::Printer> 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; |