1Test::TempDir::Handle(3U)ser Contributed Perl DocumentatiToenst::TempDir::Handle(3)
2
3
4
6 Test::TempDir::Handle - A handle for managing a temporary directory
7 root
8
10 version 0.11
11
13 use Test::TempDir::Handle;
14
15 my $h = Test::TempDir::Handle->new( dir => dir("t/tmp") );
16
17 $h->empty;
18
19 # ...
20
21 $h->cleanup; # will delete on success by default
22
24 This class manages a temporary directory.
25
27 "dir"
28 The Path::Class::Dir that is being managed.
29
30 "lock"
31 No longer used.
32
33 "cleanup_policy"
34 One of "success", "always" or "never".
35
36 "success" means that "cleanup" deletes only if "test_builder" says the
37 tests have passed.
38
39 "test_builder"
40 The Test::Builder singleton.
41
43 "empty"
44 Cleans out the directory but doesn't delete it.
45
46 "delete"
47 Cleans out the directory and removes it.
48
49 "cleanup"
50 Calls "delete" if the "cleanup_policy" dictates to do so.
51
52 This is normally called automatically at destruction.
53
55 Bugs may be submitted through the RT bug tracker
56 <https://rt.cpan.org/Public/Dist/Display.html?Name=Test-TempDir> (or
57 bug-Test-TempDir@rt.cpan.org <mailto:bug-Test-TempDir@rt.cpan.org>).
58
59 There is also a mailing list available for users of this distribution,
60 at <http://lists.perl.org/list/perl-qa.html>.
61
62 There is also an irc channel available for users of this distribution,
63 at "#perl" on "irc.perl.org" <irc://irc.perl.org/#perl-qa>.
64
66 יובל קוג'מן (Yuval Kogman) <nothingmuch@woobling.org>
67
69 This software is copyright (c) 2006 by יובל קוג'מן (Yuval Kogman).
70
71 This is free software; you can redistribute it and/or modify it under
72 the same terms as the Perl 5 programming language system itself.
73
74
75
76perl v5.38.0 2023-07-21 Test::TempDir::Handle(3)