Test::TempDir
Temporary files support for testing.
- Provided by: libtest-tempdir-perl (Version: 0.08-1)
- Report a bug
Temporary files support for testing.
use Test::TempDir;
my $test_tempdir = temp_root();
my ( $fh, $file ) = tempfile();
my $directory_scratch_obj = scratch();
Test::TempDir provides temporary directory creation with testing in mind.
The differences between using this and using File::Temp are:
If "t/tmp" is available (writable, creatable, etc) it's preferred over $ENV{TMPDIR} etc. Otherwise a temporary directory will be used.
This is "temp_root"
The default options are changed to use "temp_root" for "DIR" and disable "CLEANUP", but these are overridable.
File::Temp, Directory::Scratch, Path::Class
This module is maintained using Git. You can get the latest version from <git://github.com/nothingmuch/test-tempdir.git>.
Yuval Kogman <nothingmuch@woobling.org>
Copyright (c) 2008 Yuval Kogman. All rights reserved
This program is free software; you can redistribute
it and/or modify it under the same terms as Perl itself.