On Fri, Mar 28, 2003 at 12:51:32PM -0500, Chris Winters wrote:
> So when you call:
>
> [% PROCESS foo::mytemplate %]
>
> (I overrode Template::Context to allow the package::template syntax.)
Did you know you can also achieve the same thing like this:
my $foo = Template::Provider->new( INCLUDE_PATH => ... );
my $bar = Template::Provider->new( INCLUDE_PATH => ... );
my $template = Template->new({
LOAD_TEMPLATES => [ $foo, $bar ],
PREFIX_MAP => {
foo => 0,
bar => 1,
}
});
Then in your templates you write:
[% INCLUDE foo:header %]
or
[% INCLUDE bar:header %]
and the call will be mapped to the appropriate provider.
A
_______________________________________________
templates mailing list
[EMAIL PROTECTED]
http://lists.template-toolkit.org/mailman/listinfo/templates