From: Matt S Trout Date: Sat, 8 Jan 2011 15:12:58 +0000 (+0000) Subject: terser dumper output X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=scpubgit%2FClifton.git;a=commitdiff_plain;h=f3e28b6bc37b4815384b64e189feceac3df72976 terser dumper output --- diff --git a/lib/App/Clifton/ConsoleService/Session.pm b/lib/App/Clifton/ConsoleService/Session.pm index 3a590e9..82fc1d4 100644 --- a/lib/App/Clifton/ConsoleService/Session.pm +++ b/lib/App/Clifton/ConsoleService/Session.pm @@ -57,7 +57,10 @@ sub handle_eval { @ret = $eval->eval($body); 1; } or ($code, @ret) = (ERROR => $@); $self->_send_response( - $code => do { local $Data::Dumper::Maxdepth = 1; Dumper @ret } + $code => ($code eq 'RESULT' + ? do { local $Data::Dumper::Maxdepth = 1; Dumper @ret } + : $ret[0] + ) ); }