On Thu, 2004-02-19 at 16:38, Jason Gottshall wrote:
> Unfortunately, the 
> INCLUDE_PATH is defined when the Template::Service object is first 
> instantiated.

...but can be changed at any time, just by calling the include_path()
method in Template::Provider.  I typically just call this on each
request before I call process().

$tt->{'SERVICE'}->{'CONTEXT'}->{'LOAD_TEMPLATES'}->[0]->include_path(['foo','bar']);

Or you can just keep a reference to the array ref you pass in when you
call Template->new() and change it any time.

our $INCLUDE_PATH = ['foo', 'bar'];

my $tt = Template->new(INCLUDE_PATH => $INCLUDE_PATH)
        || die $Template::ERROR, "\n";

@{$INCLUDE_PATH} = qw(baz quux); # include path is now different for $tt

- Perrin


_______________________________________________
templates mailing list
[EMAIL PROTECTED]
http://lists.template-toolkit.org/mailman/listinfo/templates

Reply via email to