logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

File::Fu::Dir::Temp - temporary directories

Author

       Eric Wilhelm @ <ewilhelm at cpan dot org>

       http://scratchcomputing.com/

Bugs

       If you found this module on CPAN, please report any bugs or feature requests through the web interface at
       <http://rt.cpan.org>.  I will be notified, and then you'll automatically be notified of progress on your
       bug as I make changes.

       If you pulled this development version from my /svn/, please contact me directly.

License

       This program is free software; you can redistribute it and/or modify it under the same terms as Perl
       itself.

perl v5.36.0                                       2022-12-07                           File::Fu::Dir::Temp(3pm)

Name

       File::Fu::Dir::Temp - temporary directories

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.

Synopsis

         use File::Fu;
         my $dir = File::Fu->temp_dir;

   new
         my $tmp = File::Fu::Dir::Temp->new($dir, 'foo');

   chdir
         my $dir = $dir->chdir;

   rename
       Same as the base rename(), but promotes the temp dir to a regular Dir object (prevents any cleanup
       actions.)

         $temp = $temp->rename($dest);

   nocleanup
       Disable autocleanup.

         $dir->nocleanup;

   DESTROY
       Called automatically when the object goes out of scope.

         $dir->DESTROY;

See Also