File::...r::Temp(3pm)
π File::Fu::Dir::Temp β the manual page, but make it cute π
okay bestie, welcome to the File::Fu::Dir::Temp page from the User Contributed Perl Documentation. it's all about temporary directories β the little throwaway folders that clean themselves up so you don't have to. iconic behaviour honestly. π
β¨ NAME β¨
File::Fu::Dir::Temp β temporary directories. yes that's the whole name section, she's brief and she's booked. π
πΈ SYNOPSIS πΈ
first things first, pull in the parent and grab yourself a temp dir:
use File::Fu;
my $dir = File::Fu->temp_dir;
then the fun little methods, one by one:
π¦ new
make a new one, with a starting dir and a name:
my $tmp = File::Fu::Dir::Temp->new($dir, 'foo');
π¦ chdir
hop into it and get the dir back:
my $dir = $dir->chdir;
π¦ rename
literally the same as the base rename(), BUT β and this is the glow-up β it promotes the temp dir to a regular Dir object. that means no more cleanup actions, ever. it's a real dir now, it's got main character energy. π
$temp = $temp->rename($dest);
π¦ nocleanup
turn off the autocleanup. you're saying "no thank you, I'll handle this myself."
$dir->nocleanup;
π¦ DESTROY
gets called automatically the moment the object goes out of scope. it's not a ghost, it's just tidy. π«Ά
$dir->DESTROY;
π AUTHOR π
Eric Wilhelm @ <ewilhelm at cpan dot org>
π BUGS π
if you found this module on CPAN, pls report any bugs or feature requests through the web interface at <http://rt.cpan.org>. he gets notified, and then you automatically get notified about progress on your bug as changes get made. closed loop, we love to see it. β¨
if you pulled this development version from his /svn/, hit him up directly instead.
π COPYRIGHT π
Copyright (C) 2008 Eric L. Wilhelm, All Rights Reserved.
π NO WARRANTY π
Absolutely, positively NO WARRANTY, neither express or implied, is offered with this software. You use this software at your own risk. In case of loss, no person or entity owes you anything whatsoever. You have been warned.
bestie this is not a drill, there is genuinely zero warranty here, not even the implied kind, and if something goes sideways nobody owes you anything. take it seriously fr fr. π
π LICENSE π
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
and that's the whole page, bestie, you ate it. π this was File::Fu::Dir::Temp from the Perl v5.36.0 docs, dated 2022-12-07, living under the File::...r::Temp(3pm) name at the top and bottom of the original. go make some temp dirs, stay slay, don't forget the cleanup. π
β¨
π¦ where this page comes from
- debian bookworm: libfile-fu-perl 0.0.8-5 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libfile-fu-perl 0.0.8-5 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libfile-fu-perl 0.0.8-5 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libfile-fu-perl 0.0.8-5 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libfile-fu-perl 0.0.8-5 Β· 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