NAME

Templer::Plugin::Hash - Create SHA1 hashes from file contents.

SYNOPSIS

The following is a good example use of this plugin

title: About my site
hash: hash_file( "slaughter-2.7.tar.gz" )
----
<p><!-- tmpl_var name='hash_src' --> has hash <!-- tmpl_var name='hash_val' --></p>

DESCRIPTION

Given a use of hash_file two variables will be populated, one containing the path to the file, and one containing the hash.

LICENSE

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".

AUTHOR

Steve Kemp <steve@steve.org.uk>

COPYRIGHT AND LICENSE

Copyright (C) 2013-2014 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.

METHODS

new

Constructor. No arguments are required/supported.

expand_variables

This is the method which is called by the Templer::Plugin::Factory to expand the variables contained in a Templer::Site::Page object.

This method will expand any variable that has a value of 'hash_file(.*)' into two variables accessible from your template.