Module::Provision::TraitFor::Rendering - Renders Templates
use Moose; extends 'Module::Provision::Base'; with 'Module::Provision::TraitFor::Rendering';
Renders templates. Uses a list stored in the index file index.json which by default is in the ~/.module_provision directory
Requires the consuming class to define the attributes; appldir, builder, dist_module, incdir, initial_wd, stash, testdir, and vcs
appldir
builder
dist_module
incdir
initial_wd
stash
testdir
vcs
Defines the following attributes;
force
Overwrite the output files if they already exist
templates
Location of the code templates in the users home directory. Defaults to .module_provision
template_dir
Directory where the templates live
template_list
Data structure that maps the files in the template directory to the files in the project directory
$exit_code = $self->dump_stash;
Uses the internal dumper method to produce a pretty coloured listing
$tuple = $self->expand_tuple( $tuple );
Expands the references in the passed tuple
$exit_code = $self->init_templates;
Initialise the .module_provision directory and create the index.json file
$target = $self->render_template( $template, $target );
Renders a single template using Template
$self->render_templates;
Renders the list of templates in $self->template_list be repeatedly calling calling "render_template"
$self->template_list
None
There are no known incompatibilities in this module
There are no known bugs in this module. Please report problems to the address below. Patches are welcome
Larry Wall - For the Perl programming language
Peter Flanigan, <pjfl@cpan.org>
<pjfl@cpan.org>
Copyright (c) 2017 Peter Flanigan. All rights reserved
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlartistic
This program is distributed in the hope that it will be useful, but WITHOUT WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE
To install Module::Provision, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Module::Provision
CPAN shell
perl -MCPAN -e shell install Module::Provision
For more information on module installation, please visit the detailed CPAN module installation guide.