my $h = Test::TempDir::Handle->new( dir => dir("t/tmp") );
$h->cleanup; # will delete on success by default
DESCRIPTIONThis class manages a temporary directory.
dirThe Path::Class::Dir that is being managed.
lockAn optional lock object (File::NFSLock). Just kept around for reference counting.
cleanup_policyOne of "success", "always" or "never".
"success" means that "cleanup" deletes only if "test_builder" says the tests have passed.
test_builderThe Test::Builder singleton.
emptyCleans out the directory but doesn't delete it.
deleteCleans out the directory and removes it.
cleanupCalls "delete" if the "cleanup_policy" dictates to do so.
This is normally called automatically at destruction.
AUTHORXXXX XXX'XX (Yuval Kogman) <[email protected]>
COPYRIGHT AND LICENSEThis 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.