NAME

Templer::Plugin::Dollar - A simple shell-like syntax for template variables.

DESCRIPTION

This class implements a layout template filter plugin for templer which allows template variables to be included using a dollar sign followed by an open brace, the variable name and a closing brace.

This allows template such as this to be used

<html>
  <head>
    <title>${title escape="html"}</title>
    <meta name='author' content='${author} ${email escape=url}'/>
  </head>
  <body>
  </body>
</html>

Everything between the variable name and the closing brace is used as is in the transformation. The third line of the example is for instance transformed as

<title><tmpl_var name="title" escape="html"></title>

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

Bruno Beaufils <bruno@boulgour.com>

COPYRIGHT AND LICENSE

Copyright (C) 2014 Bruno Beaufils <bruno@boulgour.com>.

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 supported/expected.

available

This plugin is always available.

filter

Filter the given template.