-
-
27 Jun 2015 00:20:17 UTC
- Distribution: Text-MicroTemplate
- Source (raw)
- Browse (raw)
- Changes
- How to Contribute
- Repository
- Issues (2)
- Testers (7282 / 4 / 9)
- Kwalitee
Bus factor: 1- 84.88% Coverage
- License: perl_5
- Perl: v5.8.0
- Activity
24 month- Tools
- Download (29.75KB)
- MetaCPAN Explorer
- Permissions
- Subscribe to distribution
- Permalinks
- This version
- Latest version
and 1 contributors- Kazuho Oku <kazuhooku gmail.com>
- Dependencies
- unknown
- Reverse dependencies
- CPAN Testers List
- Dependency graph
NAME
Text::MicroTemplate::File - a file-based template manager
SYNOPSIS
use Text::MicroTemplate::File; our $mtf = Text::MicroTemplate::File->new( include_path => [ $path1, $path2, ... ], use_cache => 1, ); # render $mtf->render_file('template.file', $arg1, $arg2, ...);
DESCRIPTION
Text::MicroTemplate::File is a file-based template manager for Text::MicroTemplate.
PROPERTIES
Text::MicroTemplate provides OO-style interface with following properties.
include_path
include path (default: ['.'])
This accessor is readonly.
use_cache
cache mode (0: no cache (default), 1: cache with update check, 2: cache but do not check updates)
open_layer
layer passed to open (default: ":utf8")
package_name
package under where template files are compiled (default: "main")
METHODS
build_file($file)
Returns a subref that renders given template file.
render_file($file, @args)
Renders the template file with given arguments.
wrapper_file($file, @args)->(sub { template lines })
Wraps given template with wrapper file. Internally the processed template is passed as $_[0] to the wrapper template.
SEE ALSO
AUTHOR
Kazuho Oku <kazuhooku gmail.com>
LICENSE
This program is free software, you can redistribute it and/or modify it under the same terms as Perl 5.10.
Module Install Instructions
To install Text::MicroTemplate, copy and paste the appropriate command in to your terminal.
cpanm Text::MicroTemplate
perl -MCPAN -e shell install Text::MicroTemplate
For more information on module installation, please visit the detailed CPAN module installation guide.