The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Templer::Plugin::Redis - A plugin to retrieve values from Redis

SYNOPSIS

The following is a good example use of this plugin

  title: About my site
  count: redis_get( "total_count" )
  ----
  <p>There are <!-- tmpl_var name='count' --> ponies.</p>

DESCRIPTION

This plugin allows template variables to be values retrieved from a redis store.

It is assumed that redis will be running on the localhost, if it is not you may set the environmental variable REDIS_SERVER to point to your IP:port pair.

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

METHODS

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.

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 redis-fetches.