diff options
author | Jesse Luehrs <doy@tozt.net> | 2011-08-02 02:15:22 -0500 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2011-08-02 02:15:22 -0500 |
commit | abf958af44e43c8df7f5dae4ca291e186cb04a02 (patch) | |
tree | 276a13345e9617307a8117ea63c2e734ea14d41b /lib/Eval/Closure.pm | |
parent | 0de2a1d9871b2c7583379c34597057603336fdd2 (diff) | |
download | eval-closure-copy_hints.tar.gz eval-closure-copy_hints.zip |
is setting up hints as in the caller a sane thing to do?copy_hints
Diffstat (limited to 'lib/Eval/Closure.pm')
-rw-r--r-- | lib/Eval/Closure.pm | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/Eval/Closure.pm b/lib/Eval/Closure.pm index ccd2bbc..3d022c9 100644 --- a/lib/Eval/Closure.pm +++ b/lib/Eval/Closure.pm @@ -192,8 +192,9 @@ sub _clean_eval_closure { sub _make_compiler { my $source = _make_compiler_source(@_); + my @caller = caller(2); # XXX make sure this stays in sync - return @{ _clean_eval($source) }; + return @{ _clean_eval($source, $caller[8]) }; } $Eval::Closure::SANDBOX_ID = 0; @@ -204,6 +205,7 @@ sub _clean_eval { package Eval::Closure::Sandbox_$Eval::Closure::SANDBOX_ID; local \$@; local \$SIG{__DIE__}; +BEGIN { \$^H = $_[1] } my \$compiler = eval \$_[0]; my \$e = \$@; [ \$compiler, \$e ]; |