- if (defined $param{safe}) {
- $safe = $param{safe};
- }
- else {
- print STDERR "Created new safe\n" if $DEBUG;
- $safe = Safe->new() or die "Unable to create safe compartment";
- $safe->permit_only(':base_core',':base_loop',':base_mem',
- qw(padsv padav padhv padany),
- qw(rv2gv refgen srefgen ref),
- qw(caller require entereval),
- qw(gmtime time sprintf prtf),
- qw(sort),
- );
- $safe->share('*STDERR');
- $safe->share('%config');
- $hole->wrap(\&Debbugs::Text::include,$safe,'&include');
- my $root = $safe->root();
- # load variables into the safe
- for my $key (keys %{$param{variables}||{}}) {
- print STDERR "Loading $key\n" if $DEBUG;
- if (ref($param{variables}{$key})) {
- no strict 'refs';
- print STDERR $safe->root().'::'.$key,qq(\n) if $DEBUG;
- *{"${root}::$key"} = $param{variables}{$key};
- }
- else {
- no strict 'refs';
- ${"${root}::$key"} = $param{variables}{$key};
- }
- }
- for my $key (keys %{exists $param{hole_var}?$param{hole_var}:{}}) {
- print STDERR "Wraping $key as $param{hole_var}{$key}\n" if $DEBUG;
- $hole->wrap($param{hole_var}{$key},$safe,$key);
- }
- }
+# if (defined $param{safe}) {
+# $safe = $param{safe};
+# }
+# else {
+# print STDERR "Created new safe\n" if $DEBUG;
+# $safe = Safe->new() or die "Unable to create safe compartment";
+# $safe->permit_only(':base_core',':base_loop',':base_mem',
+# qw(padsv padav padhv padany),
+# qw(rv2gv refgen srefgen ref),
+# qw(caller require entereval),
+# qw(gmtime time sprintf prtf),
+# qw(sort),
+# );
+# $safe->share('*STDERR');
+# $safe->share('%config');
+# $hole->wrap(\&Debbugs::Text::include,$safe,'&include');
+# my $root = $safe->root();
+# # load variables into the safe
+# for my $key (keys %{$param{variables}||{}}) {
+# print STDERR "Loading $key\n" if $DEBUG;
+# if (ref($param{variables}{$key})) {
+# no strict 'refs';
+# print STDERR $safe->root().'::'.$key,qq(\n) if $DEBUG;
+# *{"${root}::$key"} = $param{variables}{$key};
+# }
+# else {
+# no strict 'refs';
+# ${"${root}::$key"} = $param{variables}{$key};
+# }
+# }
+# for my $key (keys %{exists $param{hole_var}?$param{hole_var}:{}}) {
+# print STDERR "Wraping $key as $param{hole_var}{$key}\n" if $DEBUG;
+# $hole->wrap($param{hole_var}{$key},$safe,$key);
+# }
+# }