On Tue, Aug 24, 2004 at 05:09:48PM -0400, Perrin Harkins wrote:
> You aren't actually telling us what problem you had here.
Sorry for being unclear about the real problem..
To recap, it's quite difficult to manage multiple variables in the same
template (bad idea).
As a workaround, I suggested the idea of implementing some kind of
$stash->unset() method in order to avoid precedences problems, for instance,
when dealing with multiples variables inside the same template.
(again, still not a good idea :)
> Maybe you were looking for INCLUDE instead of PROCESS? With INCLUDE,
> the stash is not clobbered by variables set inside of templates that are
> run.
How about using PROCESS to update variables which really need processing
and leaving INCLUDE for the less important stuff ?
sub handler {
my $r = shift;
my $output;
my $stash = $CONTEXT->stash(); # get the stash,
$stash->set('updateme', \$var); # some content,
$output .= $CONTEXT->include('header'); # does not need updating,
$output .= $CONTEXT->process('content');# but this does,
$output .= $CONTEXT->include('footer'); # and this doesnt.
$r->print ($output);
}
> - Perrin
Best regards,
Etienne
_______________________________________________
templates mailing list
[EMAIL PROTECTED]
http://lists.template-toolkit.org/mailman/listinfo/templates