On Thu, Nov 08, 2001 at 12:56:47AM -0500, Chris Winters wrote:
> I know I'm going to sound like a dope here, but whatever. I had no
> idea you could modify INCLUDE_PATH with each *request* 
[...]
> So how do you do it?

my $inc = [ 'b', 'c', 'd' ];
my $tt2 = Template->new( INCLUDE_PATH => $inc );

...later, that same day....

unshift($inc, 'a');

Also, the Template::Provider has an include_path() method for accessing 
or updating the INCLUDE_PATH.  Of course, the provider is a little hard to
come by, you have to do something like this:

  my $prov = $tt2->context->{ LOAD_TEMPLATES }->[0];  

and then:

  $prov->include_path([ qw( new include path) ]);

HTH
A



Reply via email to