Fotango Ltd
and 1 contributors

NAME

Template::TAL::Provider - Base class for TAL template providers

SYNOPSIS

  my $provider = $provider_class->new;
  my $ttt = $provider_class->get_template("foo");

DESCRIPTION

TAL Templates come from Providers. You ask an instance of a provider for a template with a specific name, and it should return a Template::TAL::Template object to you for that template.

This module is the base class of all providers - it should be subclassed by developers who wish to write their own provider - for instance, to serve templates from a database.

SUBCLASSING

The only method you need to implement is get_template, which must return either a Template::TAL::Template object, or undef. If you want to do any module initialisation, override new(). See Template::TAL::Provider::Disk for the simple provider that ships with Template::TAL.

METHODS

new()

creates a new provider

get_template( template name )

Should return a Template::TAL::Template object with the given name, or die if there is no such template.

COPYRIGHT

Written by Tom Insam, Copyright 2005 Fotango Ltd. All Rights Reserved.

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

BUGS

None known. Please see Template::TAL for details of how to report bugs.

SEE ALSO

Template::TAL, Template::TAL::Provider::Disk