|
| Me too.  Most of the things you were setting in your call to
Template->new()
| can be set in $t->process() instead.  Some are trickier than others (like
| changing the include path on each request), but recipes are in the mailing
| list archives.

]- Yep I just forgot to mention that I'm using VARIABLES (PRE_DEFINE) so it
doesn't work for me...
I've tried but process() can't set VARIABLES isn't it ?! Any workaround to
this ?
i.e. it someting like this :

 package Blah;

sub objMethod {
 my $self =shift;
 $self->setVARIABLES;
 $$self{tpl} = Template->new(
  VARIABLES => $$self{VARIABLES},
  INCLUDE_PATH => $c{dir}{html},
  INTERPOLATE  => 0,
  TAG_STYLE => 'php'
 );

$$self{main} ||= 'head/base.html';
my $all;
 $$self{tpl}->process($$self{main},$$self{vars},\$all) || print
$$self{tpl}->error();
 return \$all
}



Reply via email to