Template::TAL::Provider - Base class for TAL template providers
my $provider = $provider_class->new; my $ttt = $provider_class->get_template("foo");
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.
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.
get_template
new()
creates a new provider
Should return a Template::TAL::Template object with the given name, or die if there is no such template.
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.
None known. Please see Template::TAL for details of how to report bugs.
Template::TAL, Template::TAL::Provider::Disk
To install Template::TAL, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Template::TAL
CPAN shell
perl -MCPAN -e shell install Template::TAL
For more information on module installation, please visit the detailed CPAN module installation guide.