Test::TempDir::Factory(3pm) | User Contributed Perl Documentation | Test::TempDir::Factory(3pm) |
Test::TempDir::Factory - A factory for creating Test::TempDir::Handle objects
version 0.10
my $f = Test::TempDir::Factory->new; my $d = $f->create; $d->empty; # ... $d->cleanup
This class creates Test::TempDir::Handle objects with the right "dir" parameter, taking care of obtaining locks, creating directories, and handling fallback logic.
Whether or not to enable locking.
Defaults to true.
A hash reference to pass to File::NFSLock.
Defaults to "NONBLOCKING"
How many times to try to create and lock a directory.
Defaults to 2.
The directory under "t_dir" to use.
Defaults to "tmp"
Defaults to "t"
Whether to always use a temporary subdirectory under the temporary root.
This means that with a "success" cleanup policy all failures are retained.
When disabled, "t/tmp" will be used directly as "temp_root".
Defaults to true.
The template to pass to "tempdir". Defaults to "File::Temp::TEMPXXX".
Defaults to Test::TempDir::Handle.
Whether or not to "carp" diagnostics when falling back.
If you subclass this factory and add a "logger" method a la MooseX::Logger then this parameter is ignored and all messages will be "warn"ed on the logger.
Create a Test::TempDir::Handle object with a proper "dir" attribute.
XXXX XXX'XX (Yuval Kogman) <nothingmuch@woobling.org>
This software is copyright (c) 2006 by XXXX XXX'XX (Yuval Kogman).
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
2016-02-21 | perl v5.22.1 |