Template::TAL::Provider::Disk - find template files on disk
my $provider = Template::TAL::Provider::Disk->new->include_path( "./templates" ); my $ttt = $provider->get_template("foo.tal");
A Template::TAL::Provider that creates template objects from files on disk.
Given a list of include paths, it will search them in order, looking for a named template, then return it in a Template::TAL::Template object.
This is the default provider and an instance will be created for each Template::TAL object unless an alternative provider is specified, meaning you very rarely have to use this class directly.
When called with no argument returns an arrayref of the search paths. May be called with an argument, either a simple string or an arrayref, to set a new search path / new search paths respectivly and return self.
searches the include path for files of the given name, and returns the first found as a Template::TAL::Template object. Will die if it can't find a template file with the given name or is unable to open the named file.
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.
Please see Template::TAL for details of how to report bugs.
Note that currently, this explicitly doesn't do any caching. We rely on the operating system to do that for us.
Template::TAL, Template::TAL::Provider
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.