On Thu, Apr 1, 2010 at 10:24 AM, Glenn R. Martin <[email protected]> wrote:
> I was wondering if there is anyway to effectively return a processed
> document to store in a variable. Something like:
> $processedDocument = $tt->process('templatefile.tpl', {myvar => 'var'})
According to the documentation you can do this:
my $processedDocument;
$tt->process('templatefile.tpl', {myvar => 'var'}, \$processedDocument);
# $processedDocument now has the results.
HTH,
Clayton
--
Clayton Scott
[email protected]
_______________________________________________
templates mailing list
[email protected]
http://mail.template-toolkit.org/mailman/listinfo/templates