NAME

Template::Direct - Creates a document page based on template/datasets

SYNOPSIS

use Template::Direct;

my $template = Template::Direct->new( Location => $fileName/$refName );

my $result = $page->compile( Data => {DataSets}, Language => 'en' );

DESCRIPTION

Creates, Saves and Manages templates, their languages, the publication of
and also does some work with the template design when saving unpublished templates

METHODS

$class->new( %properties )

Create a new template, takes the arguments:

  * Directory - Location of all files, base path.
  * Location  - Location of the template (Filename)

$template->loadPage( Language => [] )

Load a Template Page object with specific language fallbacks.
Returns Template::Direct::Page object.

$template->compile( $data, Language => [] )

Short cut for loading the page with Languages and then
Compiling that page with data. Returns final page string.

$template->load( %properties )

Load a specific version of a template file, returns
the template as a string.

$template->_suitableLanguage( Template => 'filename', Language => [] )

Returns a suitable language to use for this template, given what exists.

AUTHOR

Copyright, Martin Owens 2008, AGPL