Perrin wrote:
> 
> On Wed, 2005-01-05 at 11:26 +0000, Andy Wardley wrote:
> > That's another item from the "seemed like a great idea at 
> the time" list 
> > that is fixed in TT3.   :-)
> 
> All I ask is that you name the fast non-localizing way that 
> 99.9% of the world should be using "INCLUDE" and name the localizing
> way something else. 

I seem to find reasons to use INCLUDE a little more frequently. For
example, if I use PROCESS in this situation, my default variable is
useless:

foo.tt:
=======
[% DEFAULT size = 6 -%]
This one's size is [% size %]

bar.tt:
=======
First: [% PROCESS foo.tt size = 3 %]
Second: [% PROCESS foo.tt size = 12 %]
Third: [% PROCESS foo.tt %]

output:
=======
First: This one's size is 3
Second: This one's size is 12
Third: This one's size is 12    
# But I want it to be 6, so I should have been using INCLUDE

I use this kind of construct pretty frequently, but I agree that it
would be helpful if the directive names were more intuitive. Maybe
something cumbersome and ugly like INCLUDE and INCLUDE_SAFELY...



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

Reply via email to