1Test::TempDir::Factory(U3s)er Contributed Perl DocumentatTieosnt::TempDir::Factory(3)
2
3
4

NAME

6       Test::TempDir::Factory - A factory for creating Test::TempDir::Handle
7       objects.
8

SYNOPSIS

10               my $f = Test::TempDir::Factory->new;
11
12               my $d = $f->create;
13
14               $d->empty;
15
16               # ...
17
18               $d->cleanup
19

DESCRIPTION

21       This class creates Test::TempDir::Handle objects with the right "dir"
22       parameter, taking care of obtaining locks, creating directories, and
23       handling fallback logic.
24

ATTRIBUTES

26       lock
27           Whether or not to enable locking.
28
29           Defaults to true.
30
31       lock_opts
32           A hash reference to pass to File::NFSLock.
33
34           Defaults to "NONBLOCKING"
35
36       lock_attempts
37           How many times to try to create and lock a dir.
38
39           Defaults to 2.
40
41       dir_name
42           The directory under "t_dir" to use.
43
44           Defaults to "tmp"
45
46       t_dir
47           Defaults to "t"
48
49       use_subdir
50           Whether to always use a temporary subdirectory under the temporary
51           root.
52
53           This means that with a "success" cleanup policy all failures are
54           retained.
55
56           When disabled, "t/tmp" will be used directly as "temp_root".
57
58           Defaults to true.
59
60       subdir_template
61           The template to pass to "tempdir". Defaults to
62           "File::Temp::TEMPXXX".
63
64       handle_class
65           Defaults to Test::TempDir::Handle.
66
67       verbose
68           Whether or not to "carp" diagnostics when falling back.
69
70           If you subclass this factory and add a "logger" method a la
71           MooseX::Logger then this parameter is ignored and all messages will
72           be "warn"ed on the logger.
73

METHODS

75       create
76           Create a Test::TempDir::Handle object with a proper "dir"
77           attribute.
78
79
80
81perl v5.12.1                      2009-08-10         Test::TempDir::Factory(3)
Impressum