NAME

Path::Maker - make files and directories as scaffolding

SYNOPSIS

use Path::Maker;

my $maker = Path::Maker->new(base_dir => $ENV{HOME});
$maker->render_to_file('gitconfig.mt' => '.gitconfig', $ENV{USER});
$maker->create_dir('.swap');
$maker->write_file('.vimrc', "set directory=~/.swap\n");
$maker->chmod('.ssh/id_rsa', 0400);

__DATA__

@@ gitconfig.mt
[user]
    name = <?= $_[0] ?>

DESCRIPTION

Path::Maker helps you make files or directories as scaffolding. When I wrote a CLI script for mojo, I found that Mojolicious::Command is very useful. This module provides some functionality of that module with template syntax Text::MicroTemplate.

CONSTRUCTOR

Constructor $maker = Path::Maker->new(%options) accepts following options:

METHOD

SEE ALSO

Mojolicious::Command

Text::MicroTemplate

Text::MicroTemplate::DataSection

LICENSE

Copyright (C) Shoichi Kaji.

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

AUTHOR

Shoichi Kaji skaji@cpan.org