On Wed, 16 Aug 2000, Peter Prymmer wrote:
>
>
> On Tue, 15 Aug 2000, Tim Jenness wrote:
>
> > > [.lib]ftmp-posix........FAILED on test 6
> > > [.lib]ftmp-security.....ok
> > > [.lib]ftmp-tempfile.....FAILED on test 14
> > >
> > > (Thanks Tim :-)
> >
> > Test 14 is, of course, the one I added :-)
>
> Well it at least sails through ftmp-posix.t whereas before it would
> just hang there.
>
Try this patch against bleedperl:
--- lib/File/Temp.pm.ori Wed Aug 16 14:09:32 2000
+++ lib/File/Temp.pm Wed Aug 16 14:09:49 2000
@@ -384,7 +384,8 @@
# Attempt to open the file
my $open_success = undef;
- if ( $^O eq 'VMS' ) { # make it auto delete on close
+ if ( $^O eq 'VMS' && !$options{"unlink_on_close"}) {
+ # make it auto delete on close on VMS if required
$fh = VMS::Stdio::vmssysopen($path, $OPENFLAGS, 0600, 'fop=dlt');
$open_success = $fh;
} else {
It reverts to using standard sysopen if delete_on_close
is not required. Craig suggested that normal sysopen would be fine in that
case. If it's not then the other option is simply to make translate the
fop=dlt to '' unless unlink_on_close.
--
Tim Jenness
JCMT software engineer/Support scientist
http://www.jach.hawaii.edu/~timj