diff options
author | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2002-10-04 20:01:54 +0000 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2002-10-04 20:01:54 +0000 |
commit | d00660f465786916fefe3ea27590f9ad4976afab (patch) | |
tree | 79bef81573f4f0480d80b32143c17347cf7763ae /ext/Opcode | |
parent | 33f7e1aa9bf0173d92dc0c0b35d57754dbf6c87e (diff) | |
download | perl-d00660f465786916fefe3ea27590f9ad4976afab.tar.gz |
Complement to change #17976 :
there was a similar bug on rdo().
Increment $Safe::VERSION.
p4raw-link: @17976 on //depot/perl: 33f7e1aa9bf0173d92dc0c0b35d57754dbf6c87e
p4raw-id: //depot/perl@17977
Diffstat (limited to 'ext/Opcode')
-rw-r--r-- | ext/Opcode/Safe.pm | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/ext/Opcode/Safe.pm b/ext/Opcode/Safe.pm index 8d875ef5b2..ad46bbbe69 100644 --- a/ext/Opcode/Safe.pm +++ b/ext/Opcode/Safe.pm @@ -3,7 +3,7 @@ package Safe; use 5.003_11; use strict; -our $VERSION = "2.07"; +our $VERSION = "2.08"; use Carp; @@ -155,7 +155,7 @@ sub share_from { my $no_record = shift || 0; my $root = $obj->root(); croak("vars not an array ref") unless ref $vars eq 'ARRAY'; - no strict 'refs'; + no strict 'refs'; # Check that 'from' package actually exists croak("Package \"$pkg\" does not exist") unless keys %{"$pkg\::"}; @@ -190,7 +190,7 @@ sub share_record { sub share_redo { my $obj = shift; my $shares = \%{$obj->{Shares} ||= {}}; - my($var, $pkg); + my($var, $pkg); while(($var, $pkg) = each %$shares) { # warn "share_redo $pkg\:: $var"; $obj->share_from($pkg, [ $var ], 1); @@ -228,7 +228,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); } |