Test::TempDir::Factory(3p)

NAME
Test::TempDir::Factory - A factory for creating Test::TempDir::Handle objects

VERSION
version 0.11

SYNOPSIS
    my $f = Test::TempDir::Factory->new;

    my $d = $f->create;

    $d->empty;

    # ...

    $d->cleanup

DESCRIPTION
This class creates Test::TempDir::Handle objects with the right "dir" parameter, creating directories, and handling fallback logic.

ATTRIBUTES

  "lock"
No longer used.

  "lock_opts"
No longer used.

Defaults to "NONBLOCKING"

  "lock_attempts"
No longer used.

Defaults to 2.

  "dir_name"
The directory under "t_dir" to use.

Defaults to "tmp"

  "t_dir"
Defaults to "t"

  "use_subdir"
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.

  "subdir_template"
The template to pass to "tempdir". Defaults to "File::Temp::TEMPXXX".

  "handle_class"
Defaults to Test::TempDir::Handle.

  "verbose"
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.

METHODS

  "create"
Create a Test::TempDir::Handle object with a proper "dir" attribute.

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

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>.

AUTHOR
XXXX XXX'XX (Yuval Kogman) <nothingmuch@woobling.org>

COPYRIGHT AND LICENCE
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.