From d00660f465786916fefe3ea27590f9ad4976afab Mon Sep 17 00:00:00 2001 From: Rafael Garcia-Suarez Date: Fri, 4 Oct 2002 20:01:54 +0000 Subject: 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 --- ext/Opcode/Safe.pm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'ext/Opcode') 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); } -- cgit v1.2.1