Test::TempDir::Handle(3pm)

Test::TempDir::Handle3pm

A handle for managing a temporary directory root

Usage

    use Test::TempDir::Handle;
    my $h = Test::TempDir::Handle->new( dir => dir("t/tmp") );
    $h->empty;
    # ...
    $h->cleanup; # will delete on success by default

Version

version 0.11

Overview

This class manages a temporary directory.

Attributes

"dir"

The Path::Class::Dir that is being managed.

"lock"

No longer used.

"cleanup_policy"

One of "success", "always" or "never".

"success" means that "cleanup" deletes only if "test_builder" says the tests have passed.

"test_builder"

The Test::Builder singleton.

Methods

"empty"

Cleans out the directory but doesn't delete it.

"delete"

Cleans out the directory and removes it.

"cleanup"

Calls "delete" if the "cleanup_policy" dictates to do so.

This is normally called automatically at destruction.

Support

Bugs may be submitted through the RT bug tracker <https://rt.cpan.org/Public/Dist/Display.html?Name=Test-TempDir> (or [email protected] <mailto:[email protected]>).

There is also a mailing list available for users of this distribution, at <http://lists.perl.org/list/perl-qa.html>.

There is also an irc channel available for users of this distribution, at "#perl" on "irc.perl.org" <irc://irc.perl.org/#perl-qa>.

Releases

8 releases since Debian 6.0 (Squeeze); the text changed 4 times.

  1. 6.0–7
  2. 8
  3. 9–10
  4. 11
  5. 12–13

Author

XXXX XXX'XX (Yuval Kogman) <[email protected]>

From libtest-tempdir-perl 0.11-2 in Debian 13 (Trixie). Parsed by carta from the page's man source.