* Chris Ochs <chris at paymentonline.net> [2004/03/02 10:34]:
> We are using the template toolkit as a base for our own web application
> server.  We have a number of custom functions/tags that are defined as
> template variables like so:
> 
> $vars = {
>      csm => MyPackage::Csm->new,
> }
> 
> My question is, when is MyPackage::Csm->new actually called?  Is it called
> only if a function in MyPackage::Csm is called via a tag such as [%
> csm.myfunction %] ?  Or is MyPackage::Csm->new called every time a template
> is processed regardless of whether any MyPackage::Csm functions are called?

Since you're assigning the return of MyPackage::Csm->new to
$vars->{'csm'}, it happens before the template is processed.

(darren)

-- 
The test for truth is still quicker than the addition.

Attachment: pgp00000.pgp
Description: PGP signature

Reply via email to