On Wed, Jul 16, 2003 at 12:06:26PM +0100, Andy Wardley wrote:
> Does that mean you were in my talk and didn't come and introduce yourself
> afterwards? How am I ever expected to put faces to names? :-)
Yep. But then, I didn't actually stay to the end of the talk, and didn't
really see you around much after that ...
> my $template = Template->new({
> LOAD_TEMPLATES => [ $foo, $bar, $baz, $wiz ],
> PREFIX_MAP => {
> src => '0, 2', # $foo and $baz
> lib => '1, 2', # $bar and $baz
> all => '0, 1, 2', # $foo, $bar and $baz
> }
> });
Hmmm. I suspect this might make slightly more sense if was more apparent
what $foo, $bar, $baz and $wiz might actually be... Are these instances
of Template::Provider (or appropriate subclass)?
> Thus [% INCLUDE src:hello.tt2 %] indicates the 'hello.tt2' template
> to be provided by $foo or $baz, [% INCLUDE lib:hello.tt2 %] is mapped
> to $bar and $baz, [% INCLUDE all:hello.tt2 %] can be provided by
> $foo, $bar or $baz, and the default [% INCLUDE hello.tt2 %] is
> mapped to the entire LOAD_TEMPLATES list: $foo, $bar, $baz and $wiz.
Does this work dynamically?
i.e. can you do [% INCLUDE $provider:hello.tt2 %]
I have a feeling that this could be a very useful thing, but haven't
quite worked out how yet :)
Tony
_______________________________________________
templates mailing list
[EMAIL PROTECTED]
http://lists.template-toolkit.org/mailman/listinfo/templates