diff options
author | Jesse Luehrs <doy@tozt.net> | 2010-10-20 14:45:14 -0500 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2010-10-20 14:45:14 -0500 |
commit | a30f41f751f2b5f939d14f5dc72f551776c2f7f9 (patch) | |
tree | f1df21483755ee050c2cc948db2aa7a6033c726c | |
parent | d33192724b4e73a6603e1c50cfd7b531715fd007 (diff) | |
download | eval-closure-a30f41f751f2b5f939d14f5dc72f551776c2f7f9.tar.gz eval-closure-a30f41f751f2b5f939d14f5dc72f551776c2f7f9.zip |
don't need this to be a do block anymore
-rw-r--r-- | lib/Eval/Closure.pm | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/lib/Eval/Closure.pm b/lib/Eval/Closure.pm index 0b8bd27..86a8377 100644 --- a/lib/Eval/Closure.pm +++ b/lib/Eval/Closure.pm @@ -50,17 +50,15 @@ sub _clean_eval_closure { # my ($source, $__captures, $name) = @_ my $__captures = $_[1]; - do { - local $@; - local $SIG{__DIE__}; + local $@; + local $SIG{__DIE__}; - if ($ENV{EVAL_CLOSURE_PRINT_SOURCE}) { - _dump_source(_make_source(@_), $_[2]); - } + if ($ENV{EVAL_CLOSURE_PRINT_SOURCE}) { + _dump_source(_make_source(@_), $_[2]); + } - my $code = eval _make_source(@_); - ($code, $@); - }; + my $code = eval _make_source(@_); + ($code, $@); } sub _make_source { |