Most of the problems you're seeing are caused by "global" symbols
(stuff like @INC, $", etc.) that aren't being set properly in the
Safe:: partition...The code in OYSTER and SCRIPT.PM try to work 
around limitations in Safe::, but obviously there's a few cases
I've missed. 

Here's another small patch to SCRIPT.PM, it removes the "localizing"
but resets $^O after running the script in case a malicious/oddball
script tries to set it.  

I finally got DBI 1.14 to build, and at least "use DBI;" and a 
trivial call or two seem to work in CRINOID scripts.  So there
may be some light at the end of the tunnel!

--- script.pm;59        Wed Aug  9 05:45:27 2000
+++ script.pm   Thu Aug 10 04:41:08 2000
@@ -135,7 +135,7 @@
         %{$root."::INC"} = %INC;
         my $expr = join('',@p);
         $line  = sprintf('package %s; use subs qw(exit); sub { %s ', $root, $ialarm);
-        $line .= 'local $^A; local $^C; local $^F; local $^I; local $^O; local $^P;';
+        $line .= 'local $^A; local $^C; local $^F; local $^I; local $^P;';
 #        $line .= 'local $#;';      ### causes weird problems ###
         $line .= 'local $%;';
         $line .= 'local $,;';
@@ -164,6 +164,7 @@
 
     $status = $self->rdo2();
     %{$self->{INC}} = %INC;
+    $^O = 'VMS' if $^O ne 'VMS';
     return $status;
 }
 
--
 Drexel University       \V                    --Chuck Lane
======]---------->--------*------------<-------[===========
     (215) 895-1545     _/ \  Particle Physics
FAX: (215) 895-5934     /\ /~~~~~~~~~~~        [EMAIL PROTECTED]

Reply via email to