Test::...actory(3pm)
π Test::TempDir::Factory π
okay bestie so this is Test::TempDir::Factory (a 3pm perl manual page, iykyk) and it's literally a factory for making Test::TempDir::Handle objects β¨ no cap, that's the whole NAME situation.
β¨ VERSION β¨
version 0.11 π
πΈ SYNOPSIS πΈ
ok so here's the vibe, copy-paste it into your little test file and watch it slay:
my $f = Test::TempDir::Factory->new;
my $d = $f->create;
$d->empty;
# ...
$d->cleanup
periodt π
π¦ DESCRIPTION π¦
This class creates Test::TempDir::Handle objects with the correct dir parameter. That's it, that's the job β it makes the directories, and it handles the fallback logic. main character energy honestly π
π ATTRIBUTES π
π lock
No longer used. rip to a real one π
π lock_opts
No longer used either, bestie. it's giving retirement party π
Defaults to NONBLOCKING.
π lock_attempts
No longer used. fr fr.
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 β so if something goes wrong you can still go look at it. iconic behaviour honestly π«Ά
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 warned on the logger instead. so like, choose your destiny β¨
π₯ METHODS π₯
π create
Create a Test::TempDir::Handle object with a proper dir attribute. that's the one. that's the girlboss method π
π«Ά SUPPORT π«Ά
Bugs may be submitted through the RT bug tracker at <https://rt.cpan.org/Public/Dist/Display.html?Name=Test-TempDir> β or if email is more your vibe, hit up bug-Test-TempDir@rt.cpan.org π
There's also a mailing list available for users of this distribution, over at <http://lists.perl.org/list/perl-qa.html>. join the chat bestie π
And there's an irc channel available for users of this distribution too β #perl on irc.perl.org <irc://irc.perl.org/#perl-qa>. come hang out π
π AUTHOR π
XXXX XXX'XX (Yuval Kogman) <nothingmuch@woobling.org> β thank you for your service, legend π
π 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 π
and that's the whole page, bestie!! π this masterpiece shipped asperl v5.34.0and got its glow-up on2022-07-11β go forth and make temp dirs responsibly πβ¨π¦
π¦ 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