summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2013-05-29 02:57:07 -0500
committerJesse Luehrs <doy@tozt.net>2013-05-29 02:57:07 -0500
commitf5fd49ff2cb841596873d268b776d8d12d7fd952 (patch)
tree718351f1019e69ed887be408a41f803ac0f6b15b
parentbbff4c5f32d88a4799ecf917a63b79abe610e93e (diff)
downloadreply-f5fd49ff2cb841596873d268b776d8d12d7fd952.tar.gz
reply-f5fd49ff2cb841596873d268b776d8d12d7fd952.zip
eval_closure takes a string that evals to a coderef
-rw-r--r--lib/App/REPL/Plugin/Defaults.pm4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/App/REPL/Plugin/Defaults.pm b/lib/App/REPL/Plugin/Defaults.pm
index b226dfd..74734b9 100644
--- a/lib/App/REPL/Plugin/Defaults.pm
+++ b/lib/App/REPL/Plugin/Defaults.pm
@@ -34,10 +34,10 @@ sub evaluate {
my ($next, $line, %args) = @_;
return eval_closure(
- source => "$PREFIX; $line",
+ source => "sub { $PREFIX; $line }",
terse_error => 1,
%args,
- );
+ )->();
}
sub print_error {