MooseX::Role::Tempdir - Moose role to provide temporary directories
Version 0.03
package My::Awesome::Package; use Moose; with 'MooseX::Role::Tempdir'; my $newfh; open($newfh, '>', $self->tmpdir()."/newfile") or die "ohno! $!"; ...
You can also use parameters to tell what directories you want and/or specify tmpdir options. See File::Temp for details on supported options.
By default you will get a single temporary directory 'tmpdir' with the default options to File::Temp.
with 'MooseX::Role::Tempdir' => { dirs => [ qw/tmpdir workdir fundir/ ], tmpdir_opts => { DIR => '/my/alternate/tmp' }, }; my $newfh; open($newfh, '>', $self->fundir()."/newfile") or die "ohno! $!";
Brad Barden, <iamb at mifflinet.net>
<iamb at mifflinet.net>
Please report any bugs or feature requests to bug-moosex-role-tempdir at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=MooseX-Role-Tempdir. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
bug-moosex-role-tempdir at rt.cpan.org
You can find documentation for this module with the perldoc command.
perldoc MooseX::Role::Tempdir
You can also look for information at:
RT: CPAN's request tracker (report bugs here)
http://rt.cpan.org/NoAuth/Bugs.html?Dist=MooseX-Role-Tempdir
AnnoCPAN: Annotated CPAN documentation
http://annocpan.org/dist/MooseX-Role-Tempdir
CPAN Ratings
http://cpanratings.perl.org/d/MooseX-Role-Tempdir
Search CPAN
http://search.cpan.org/dist/MooseX-Role-Tempdir/
Copyright 2012 Brad Barden.
This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.
See http://dev.perl.org/licenses/ for more information.
To install MooseX::Role::Tempdir, copy and paste the appropriate command in to your terminal.
cpanm
cpanm MooseX::Role::Tempdir
CPAN shell
perl -MCPAN -e shell install MooseX::Role::Tempdir
For more information on module installation, please visit the detailed CPAN module installation guide.