raptor <[EMAIL PROTECTED]> said something to this effect on 10/02/2001:
> > 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 ?
> >
> > 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'
> > );
In this example, since VARIABLES is a reference to
$self->{VARIABLES}, when you update $self->{VARIABLES}, you
should be getting the current value.
Also, since VARIABLES are just passed into the template, along
with the things to pass in specifically, you should always be
able to do:
$self->{tpl}->process($template, { %{$self->{VARIABLES}}, %my_vars });
(darren)
--
Premature optimization is the root of all evil in programming.
-- C.A.R. Hoare