NAME

MooseX::Role::Tempdir - Moose role to provide temporary directories

VERSION

Version 0.03

SYNOPSIS

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! $!";

AUTHOR

Brad Barden, <iamb at mifflinet.net>

BUGS

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.

SUPPORT

You can find documentation for this module with the perldoc command.

perldoc MooseX::Role::Tempdir

You can also look for information at:

ACKNOWLEDGEMENTS

LICENSE AND COPYRIGHT

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.