From: Jesse Luehrs Date: Wed, 20 Oct 2010 20:43:36 +0000 (-0500) Subject: better error message X-Git-Tag: 0.01~20 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=3eb05ecbc5a5af77aa3397992bfbbf22c7a5a86e;p=gitmo%2FEval-Closure.git better error message --- diff --git a/lib/Eval/Closure.pm b/lib/Eval/Closure.pm index 0037337..f0457fd 100644 --- a/lib/Eval/Closure.pm +++ b/lib/Eval/Closure.pm @@ -62,8 +62,9 @@ sub _clean_eval_closure { my $e = $@; if (!ref($code) || ref($code) ne 'CODE') { + $e = "The 'source' parameter must return a subroutine reference, " + . "not $code"; undef $code; - $e = "The 'source' parameter must return a subroutine reference"; } return ($code, $e);