summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2010-10-20 15:43:36 -0500
committerJesse Luehrs <doy@tozt.net>2010-10-20 15:43:36 -0500
commit3eb05ecbc5a5af77aa3397992bfbbf22c7a5a86e (patch)
treeea538d4383861b26c420a797882fb7fc61e69200 /lib
parent18b5b42a6d73121cf9ea8092d943ca4f5d3cc545 (diff)
downloadeval-closure-3eb05ecbc5a5af77aa3397992bfbbf22c7a5a86e.tar.gz
eval-closure-3eb05ecbc5a5af77aa3397992bfbbf22c7a5a86e.zip
better error message
Diffstat (limited to 'lib')
-rw-r--r--lib/Eval/Closure.pm3
1 files changed, 2 insertions, 1 deletions
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);