A bug introduced in #8217 (the undefined variable in the
[p5sagit/p5-mst-13.2.git] / ext / Opcode / Safe.pm
index 00ee85d..a803b5f 100644 (file)
@@ -2,9 +2,8 @@ package Safe;
 
 use 5.003_11;
 use strict;
-use vars qw($VERSION);
 
-$VERSION = "2.06";
+our $VERSION = "2.06";
 
 use Carp;
 
@@ -48,6 +47,7 @@ sub new {
     # the whole glob *_ rather than $_ and @_ separately, otherwise
     # @_ in non default packages within the compartment don't work.
     $obj->share_from('main', $default_share);
+    Opcode::_safe_pkg_prep($obj->{Root});
     return $obj;
 }