use strict;
use warnings;
-use Cwd qw(cwd);
+use File::Spec;
use Test::More;
eval { require PerlIO::scalar };
$PLP::use_cache = 0 if $PLP::use_cache;
#TODO: caching on (change file names)
-my $base = -w '/tmp' ? '/tmp' : cwd();
+my $base = File::Spec->tmpdir || File::Spec->curdir;
+-w $base or BAIL_OUT("$base not writable");
my $testfile = 'testfile.plp';
not -f "$base/$testfile" or BAIL_OUT("$testfile exists");