TempDir module

developed by © SANFACE Software

Version 1.2 30th September 1999

What is tmpdir?

SANFACE Software logo
Every PERL tool use temporary files.
If you want your code can be simply portable on different OS, you need to select the correct temporary directory. The purpose of this module is to check the correct temporary directory in every OS supported by PERL to use it.
We need your help.
We ask you to send us the correct tempory directory for every OS supported by PERL and to suggest us good modifies (sanface@sanface.com).

At the moment this is the list of OS supported and the list of variables and directories the module check to find the correct to use:
Windows 32 bit ('95, '98, NT)$ENV{TEMP}, $ENV{TMP}, $ENV{windir} . '\\temp', 'c:\\temp', '.'
Unix
[aix bsd386 dec_osf dgux freebsd hp_osf1 hpux
irix linux mips_osf1 netbsd next sco sco_xenix
solaris sunos svr4 sysv ultrix uts]
$ENV{TMPDIR}, '/var/tmp', '/usr/tmp', '/tmp', '.'
Mac$ENV{TMPDIR}
OpenVMS/sys\$scratch/ (or SYS\$SCRATCH)
BeOS/tmp
If the module can't recognize your OS the temporary directory is set to .

Use testtmpdir.pl to test the module on your OS and testOS.pl to know the value of $^O PERL variable on your OS.

Synopsis

use tmpdir;

$dir=tmpdir->new ;

print "Correct temporary directory in the $^O OS is $dir\n";

The constructor new is the only method of this library. It returns the correct temporary directory if it checks correctly the OS, otherwise it returns the default directory ./

Availability

The latest version of this library is likely to be available from:

Copyright 1999, SANFACE Software
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

History

09/30/1999 version 1.2

09/15/1999 version 1.1 09/01/1999 version 1.0
First public release