# Test for File::Temp - OO interface
use strict;
# Will need to check that all files were unlinked correctly
# Set up an END block here to do it
my (@files, @dirs, @still_there);
# And a test for files that should still be around
# These are tidied up
END {
}
}
# Loop over an array hoping that the files dont exist
# And a test for directories
# Need to make sure that the END blocks are setup before
# the ones that File::Temp configures since END blocks are evaluated
# in reverse order and we need to check the files *after* File::Temp
# removes them
# Tempfile
# Open tempfile in some directory, unlink at end
# Should still be around after closing
# Check again at exit
# TEMPDIR test
# Create temp directory in current dir
CLEANUP => 1,
);
# Create file in the temp dir
);
# Test tempfile
# ..and again (without unlinking it)
# and another (with template)
);
# Create a temporary file that should stay around after
# it has been closed
# Make sure destructors run
# Now END block will execute to test the removal of directories
print "# End of tests. Execute END blocks\n";