$_[0]+1;
}
-$tmpdir = $ENV{TMP} || $ENV{TMPDIR} || '/tmp';
if (eval {require File::Spec::Functions}) {
- File::Spec::Functions->import();
+ File::Spec::Functions->import('tmpdir');
+ $tmpdir = tmpdir();
} else {
*catfile = sub { join '/', @_ };
+ $tmpdir = $ENV{TMP} || $ENV{TMPDIR} || '/tmp';
}
$file = catfile($tmpdir, "md$$");
@files = ($file, "$file.db", "$file.dir", "$file.pag");
print "1..4\n";
if (eval {require File::Spec::Functions}) {
- File::Spec::Functions->import();
+ File::Spec::Functions->import('tmpdir');
+ $tmpdir = tmpdir();
} else {
- *catfile = sub { join '/', @_ };
+ *catfile = sub { join '/', @_ };
+ $tmpdir = $ENV{TMP} || $ENV{TMPDIR} || '/tmp';
}
-$tmpdir = $ENV{TMP} || $ENV{TMPDIR} || '/tmp';
$file = catfile($tmpdir, "md$$");
1 while unlink $file, "$file.dir", "$file.pag";
tryout('Memoize::SDBM_File', $file, 1); # Test 1..4