The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Template::TAL::Provider::Disk - find template files on disk

SYNOPSIS

  my $provider = Template::TAL::Provider::Disk->new->include_path( "./templates" );
  my $ttt = $provider->get_template("foo.tal");
  

DESCRIPTION

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.

METHODS

include_path

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.

get_template( name )

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.

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

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.

SEE ALSO

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