Templer::Plugin::FileContents - A plugin to read file contents.
The following is a good example use of this plugin
title: About my site passwd: read_file( /etc/passwd ) ---- <p>This is my password file:</p> <!-- tmpl_var name='passwd' -->
This plugin reads the contents of files from the local system, and allows files to be included inline in templates.
This module is free software; you can redistribute it and/or modify it under the terms of either:
a) the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version, or
b) the Perl "Artistic License".
Steve Kemp <steve@steve.org.uk>
Copyright (C) 2012-2015 Steve Kemp <steve@steve.org.uk>.
This library is free software. You can modify and or distribute it under the same terms as Perl itself.
Constructor. No arguments are required/supported.
This is the method which is called by the Templer::Plugin::Factory to expand the variables contained in a Templer::Site::Page object.
Variables are written in the file in the form "key: value", and are internally stored within the Page object as a hash.
This method iterates over each key & value and updates any that seem to refer to file-inclusion.
To install App::Templer, copy and paste the appropriate command in to your terminal.
cpanm
cpanm App::Templer
CPAN shell
perl -MCPAN -e shell install App::Templer
For more information on module installation, please visit the detailed CPAN module installation guide.