diff options
Diffstat (limited to 'ext/Opcode/Safe.pm')
-rw-r--r-- | ext/Opcode/Safe.pm | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ext/Opcode/Safe.pm b/ext/Opcode/Safe.pm index e8efaa941d..8d875ef5b2 100644 --- a/ext/Opcode/Safe.pm +++ b/ext/Opcode/Safe.pm @@ -214,11 +214,11 @@ sub reval { # Create anon sub ref in root of compartment. # Uses a closure (on $expr) to pass in the code to be executed. # (eval on one line to keep line numbers as expected by caller) - my $evalcode = sprintf('package %s; sub { eval $expr; }', $root); + my $evalcode = sprintf('package %s; sub { @_ = (); eval $expr; }', $root); my $evalsub; - if ($strict) { use strict; $evalsub = eval $evalcode; } - else { no strict; $evalsub = eval $evalcode; } + if ($strict) { use strict; $evalsub = eval $evalcode; } + else { no strict; $evalsub = eval $evalcode; } return Opcode::_safe_call_sv($root, $obj->{Mask}, $evalsub); } |