diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2003-03-14 13:42:32 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2003-03-14 13:42:32 +0000 |
commit | 07824bd1cfb16e641e5040a9a4e23799f5535a53 (patch) | |
tree | 94d58132d4adec2beef7fb3afdd83a4defd65e7d /lib/File/Spec/VMS.pm | |
parent | 7f1236c00d2708a214ae3f72897a3a14ec6d9792 (diff) | |
download | perl-07824bd1cfb16e641e5040a9a4e23799f5535a53.tar.gz |
Cleanup the File::Spec tmpdir() implementations:
now all the platforms specific modules call _tmpdir()
(inherited from Unix.pm) with the list of platform
specific list of temporary directories, and _tmpdir()
then does the appropriate suitability checking.
p4raw-id: //depot/perl@18980
Diffstat (limited to 'lib/File/Spec/VMS.pm')
-rw-r--r-- | lib/File/Spec/VMS.pm | 19 |
1 files changed, 3 insertions, 16 deletions
diff --git a/lib/File/Spec/VMS.pm b/lib/File/Spec/VMS.pm index fab1953fca..70eb39b40f 100644 --- a/lib/File/Spec/VMS.pm +++ b/lib/File/Spec/VMS.pm @@ -4,7 +4,7 @@ use strict; use vars qw(@ISA $VERSION); require File::Spec::Unix; -$VERSION = '1.2'; +$VERSION = '1.4'; @ISA = qw(File::Spec::Unix); @@ -278,21 +278,8 @@ is tainted, it is not used. my $tmpdir; sub tmpdir { return $tmpdir if defined $tmpdir; - my @dirlist = ('sys$scratch:', $ENV{TMPDIR}); - { - no strict 'refs'; - if (${"\cTAINT"}) { # Check for taint mode on perl >= 5.8.0 - require Scalar::Util; - pop @dirlist if Scalar::Util::tainted($ENV{TMPDIR}); - } - } - foreach (@dirlist) { - next unless defined && -d && -w _; - $tmpdir = $_; - last; - } - $tmpdir = File::Spec->curdir unless defined $tmpdir; - return $tmpdir; + my $self = shift; + $tmpdir = $self->_tmpdir( 'sys$scratch:', $ENV{TMPDIR} ); } =item updir (override) |