Didn't reusing mess the things under mod_perl... and if not how can I reuse
the template object, my situation is a little bit different i use object to
encapsulate Template and other stuff i.e. :
package Blah;
sub objMethod {
   my $self = shift;
   ...
   $$self{tpl} = Template->new( ....);
}

So if I use something like this :
package Blah;
use vars qw($template);

sub objMethod {
   my $self = shift;
   ...
   $template ||= Template->new( ....);
   $$self{tpl}= $template;
}

What will happen !?!
Or it can be also "our $template", aren't it ?


Thanx in advance..
=====
iVAN
[EMAIL PROTECTED]
=====

| >    my $template = Template->new({
| >       OUTPUT => $r,
| >       EVAL_PERL => 1,
| >       INCLUDE_PATH => "$troot/src:$troot/lib:$troot/imgs"});
|
| use vars qw($template);
| $template ||= Template->new({
|                                                EVAL_PERL => 1,
|                                                INCLUDE_PATH =>
| "$troot/src:$troot/lib:$troot/imgs",
|                                                });
|
| There are many variations on this theme (like using a singleton object,
| initializing during startup.pl to save memory, etc.) but the point is to
use
| the same Template object on each request.  If you create a new one each
| time, you are defeating the caching built into TT.
|
| - Perrin




Reply via email to