diff options
author | tobez <tobez@FreeBSD.org> | 2003-04-21 14:27:37 +0000 |
---|---|---|
committer | tobez <tobez@FreeBSD.org> | 2003-04-21 14:27:37 +0000 |
commit | a598c4c80bca25ad7fba7368849d138e9363d6ad (patch) | |
tree | 4a2a74071f843dc90660f83eb92fbc7b35194fe0 /lang/perl5.6/files | |
parent | eeb4e05cd0a1f771a0d2425e78ce19e49e55519e (diff) | |
download | FreeBSD-ports-a598c4c80bca25ad7fba7368849d138e9363d6ad.zip FreeBSD-ports-a598c4c80bca25ad7fba7368849d138e9363d6ad.tar.gz |
Patch Safe.pm (see
http://use.perl.org/articles/02/10/06/1118222.shtml?tid=5).
Reported by: kuriyama
Diffstat (limited to 'lang/perl5.6/files')
-rw-r--r-- | lang/perl5.6/files/patch-Safe.pm | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/lang/perl5.6/files/patch-Safe.pm b/lang/perl5.6/files/patch-Safe.pm new file mode 100644 index 0000000..142b03c --- /dev/null +++ b/lang/perl5.6/files/patch-Safe.pm @@ -0,0 +1,20 @@ +--- ext/Opcode/Safe.pm.orig Fri Feb 23 03:57:54 2001 ++++ ext/Opcode/Safe.pm Mon Apr 21 16:24:39 2003 +@@ -213,7 +213,7 @@ 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; } +@@ -227,7 +227,7 @@ sub rdo { + my $root = $obj->{Root}; + + my $evalsub = eval +- sprintf('package %s; sub { do $file }', $root); ++ sprintf('package %s; sub { @_ = (); do $file }', $root); + return Opcode::_safe_call_sv($root, $obj->{Mask}, $evalsub); + } + |