VERSION

version 0.125

SYNOPSIS

 use Module::Starter qw(
   Module::Starter::Simple
   Module::Starter::Plugin::Template
   Module::Starter::Plugin::TT2
     ...
 );

 Module::Starter->create_distro( ... );

DESCRIPTION

This Module::Starter plugin is intended to be loaded after Module::Starter::Plugin::Template. It implements the \*(C`renderer\*(C' and \*(C`render\*(C' methods, required by the Template plugin. The methods are implemented with Template Toolkit.

EXAMPLES

This module's distribution includes a directory, \*(C`templates/dir\*(C', and a file \*(C`templates/inline\*(C' that contain stock templates for use with the InlineStore and DirStore plugins. On Debian systems these files are installed in \*(C`/usr/share/doc/libmodule-starter-plugin-tt2-perl/examples\*(C'. The module itself contains default templates for the ModuleStore plugin in its data section.

USAGE

This module is meant to be used with the template stores in the SimpleStore distribution (although you could certainly write your own template store). If you only want to use the built-in templates, you could have lines like this in your config file (\*(C`~/.module-starter/config\*(C'):

author: Lord Poncemby email: [email protected] plugins: Module::Starter::Simple Module::Starter::Plugin::Template Module::Starter::Plugin::ModuleStore Module::Starter::Plugin::TT2 template_module: Module::Starter::Plugin::TT2

(Where the plugins line is one line.) This tells Module::Starter to look for the templates in the data section of Module::Starter::Plugin::TT2, which isn't very interesting, since you'll end up getting the same effect as if you'd just used Module::Starter without plugins.

To override this behavior, you'd instruct Module::Starter to look somewhere else, either by changing the \*(C`template_module\*(C' setting, changing the \s-1MODULE_TEMPLATE_MODULE\s0 environment variable, or using a different template store altogether (q.v., SimpleStore or other plugins).

If you need to send parameters to the Template constructor, put them in the \*(C`template_parms\*(C' parameter to the \*(C`create_distro\*(C' method. It must be a hash reference.

METHODS

As implemented, this method just creates a new Template Toolkit engine and stores it in the Module::Starter object. This method passes the given template contents and options to the \s-1TT2\s0 renderer and returns the resulting document.

AUTHOR

Ricardo \s-1SIGNES\s0, \*(C`<[email protected]>\*(C'

COPYRIGHT

Copyright 2004-2006 Ricardo \s-1SIGNES\s0, All Rights Reserved.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.