Test::...:Handle(3pm)
Test::TempDir::Handle π
okay bestie, welcome to the User Contributed Perl Documentation corner of the internet, where we keep our lil temp dirs cute and contained β¨
β¨ NAME β¨
Test::TempDir::Handle β it's literally just a handle for managing a temporary directory root π
πΈ VERSION πΈ
version 0.11 β yes she's vintage, and yes she still slays π
π¦ SYNOPSIS π¦
use Test::TempDir::Handle;
my $h = Test::TempDir::Handle->new( dir => dir("t/tmp") );
$h->empty;
# ...
$h->cleanup; # will delete on success by default
no cap, that's the whole vibe. make a handle, empty it, do your lil tests, and let cleanup handle the rest π«Ά
π DESCRIPTION π
So. This class manages a temporary directory. That's it, that's the whole job, and she does it beautifully π
π ATTRIBUTES π
dirβ thePath::Class::Dirthat is being managed. this is the actual directory she's babysitting, your main character folder fr fr πlockβ no longer used. yeah, she's retired, she's living her best life somewhere, we don't ask questions πcleanup_policyβ must be one ofsuccess,alwaysornever.
and success means that cleanup deletes only if test_builder says the tests have passed. so like, she only throws away the evidence if you actually won π
test_builderβ theTest::Buildersingleton. the one and only, the icon herself β
π METHODS π
emptyβ cleans out the directory but doesn't delete it. she empties the bag but keeps the bag, iykyk πdeleteβ cleans out the directory and removes it. full send, directory is GONE πcleanupβ callsdeleteif thecleanup_policydictates to do so.
heads up bestie: this is normally called automatically at destruction. so she does her lil cleanup solo when the object yeets itself π§
π 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> β the legend herself π«Ά
β 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. slay, honestly, that's the good licence energy π
okay and that's a wrap, bestie πΈ this whole page came to you courtesy of perl v5.34.0, dated 2022-07-11 β so she's been sitting here being iconic since way before you even opened this terminal β¨ mwah π
π¦ where this page comes from
- debian bookworm: libtest-tempdir-perl 0.11-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libtest-tempdir-perl 0.11-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libtest-tempdir-perl 0.11-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libtest-tempdir-perl 0.11-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libtest-tempdir-perl 0.11-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms