From: Jesse Luehrs Date: Wed, 20 Oct 2010 19:45:14 +0000 (-0500) Subject: don't need this to be a do block anymore X-Git-Tag: 0.01~25 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=a30f41f751f2b5f939d14f5dc72f551776c2f7f9;p=gitmo%2FEval-Closure.git don't need this to be a do block anymore --- 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 {