Text::MicroMason::TemplateDir - Use Base Directory and Relative Paths
Instead of using this class directly, pass its name to be mixed in:
use Text::MicroMason; my $mason = Text::MicroMason->new( -TemplateDir );
Templates stored in files can be run directly or included in others:
print $mason->execute( file=>"./greeting.msn", 'name'=>'Charles');
This module changes the resolution of files passed to compile() and execute() to be relative to a base directory path or to the currently executing template.
Base directory from which to find templates.
Intercepts uses of file templates and applies the base-path adjustment.
For an overview of this templating framework, see Text::MicroMason.
This is a mixin class intended for use with Text::MicroMason::Base.
For distribution, installation, support, copyright and license information, see Text::MicroMason::Docs::ReadMe.
To install Text::MicroMason, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Text::MicroMason
CPAN shell
perl -MCPAN -e shell install Text::MicroMason
For more information on module installation, please visit the detailed CPAN module installation guide.