Perrin Harkins wrote:
[ Please CC the list on all replies... ]

On Mon, 2005-01-03 at 16:41 -0500, Sean T Allen wrote:
  
Hmmm.. sorry i should have been more clear...  but i was trying to get
right to the main point

I Have a template that contains country and state and user address
info.
the countries and states are stored in variables but dont change
during a run...

so I want to know

can I create an instance of Template passing it the country and state
info in the VARIABLE
arg and have it done just then so subsequent runs ( in the case under
mod-perl )
dont continually reprocess said variables
    

Yes.  You need to use the CONSTANTS option:
http://www.template-toolkit.org/docs/plain/Manual/Variables.html#Compile_Time_Constant_Folding

  

Ok... so that is good and after reading the internals again I have one more question...

if I need to only instantiate 1 instance of Template ( so long as options passed to the constructor don't change ).
then it would make sense for me to create the instance as a singleton.

using say Apache::Singleton::Process

yes?

begin:vcard
fn:Sean T. Allen
n:Allen;Sean T.
org:USA Herbals, LLC
email;internet:[EMAIL PROTECTED]
title:Tech Guru
tel;work:718-388-5424
x-mozilla-html:FALSE
version:2.1
end:vcard

Reply via email to