use File::Basename;
use File::Copy;
use File::Path;
-use File::Temp;
+use File::Temp qw/tempdir/;
use Cwd;
BEGIN { use_ok "App::FatPacker", "" }
-my $tempdir = File::Temp->newdir;
+my $keep = $ENV{'FATPACKER_KEEP_TESTDIR'};
+my $tempdir = tempdir($keep ? (CLEANUP => 0) : (CLEANUP => 1));
mkpath([<$tempdir/{lib,fatlib}/t/mod>]);
for(<t/mod/*.pm>) {
# moving away from the dir so it could be deleted
chdir $cwd;
+