NAME

HackaMol::Roles::PathRole -

VERSION

version 0.046

DESCRIPTION

This role adds some file and directory attributes to a class. This is still a work in progress, and it will probably change (suggestions welcome). The goal is to reduce the amount code required for manipulating file and directory paths used for work, and to allow scripts to be more platform independent. MooseX::Types::Path::Tiny is used to coerce the attributes into Path::Tiny objects. See Path::Tiny for associated methods. The actual construction of directories is left to scripts and extensions.

ATTRIBUTES

scratch homedir data

isa Path::Tiny coerced via AbsPath that is 'ro'

the absolute path to the directory is constructed

log_fn in_fn out_fn err_fn

isa Path::Tiny coerced via Path that is 'rw'

dirs

isa ArrayRef[Path::Tiny] coerced via AbsPaths that is 'ro'

fill your object with all the directories you wish

my $obj = SomeClass->new(dirs = [qw/. .. data tmp \/var ~\/bin/]

forts

isa ArrayRef[Path::Tiny] coerced via Paths that is 'ro'

a place for those extra files

AUTHOR

Demian Riccardi <demianriccardi@gmail.com>

COPYRIGHT AND LICENSE

This software is copyright (c) 2017 by Demian Riccardi.

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