From 48cc772251f743537652dea6083c6d6c293a508a Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Thu, 1 Aug 2013 15:12:45 -0400 Subject: new Eval::Closure supports this itself --- dist.ini | 3 +++ lib/Reply/Plugin/Defaults.pm | 8 ++------ 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/dist.ini b/dist.ini index 1a17bd7..b078e89 100644 --- a/dist.ini +++ b/dist.ini @@ -36,6 +36,9 @@ skip = ^MRO::Compat$ skip = ^Proc::InvokeEditor$ skip = ^Win32::Console::ANSI$ +[Prereqs] +Devel::LexAlias = 0 + [Prereqs / RuntimeRecommends] App::Nopaste = 0 B::Keywords = 0 diff --git a/lib/Reply/Plugin/Defaults.pm b/lib/Reply/Plugin/Defaults.pm index 797fcbb..d2acfbc 100644 --- a/lib/Reply/Plugin/Defaults.pm +++ b/lib/Reply/Plugin/Defaults.pm @@ -13,8 +13,7 @@ use warnings; use base 'Reply::Plugin'; -use Devel::LexAlias 'lexalias'; -use Eval::Closure 0.09; +use Eval::Closure 0.11; sub new { my $class = shift; @@ -55,14 +54,11 @@ sub compile { my $code = eval_closure( source => "sub {\n$prefix;\n$line\n}", terse_error => 1, + alias => 1, environment => $env, %args, ); - for my $name (keys %$env) { - lexalias($code, $name, $env->{$name}); - } - return $code; } -- cgit v1.2.3-54-g00ecf