As talked about here:
http://www.perlmonks.org/?node_id=641731
One of the posters says this issue was discussed before on the mailing list
but I couldn't find the topic.
In the following code, my $expected_result template is actually a [% PERL %]
block. Inside the block I access result and device using
$stash->get('result')...
I was wondering if there was any way for me to modify the passed variable
$template_attributes with the result of something done inside the template
block.
I tried
$stash->set('log_date', $log_date); # So that I could keep track of a date
based on some perl calculations inside the template
but I realized that once process was finished it wasn't saved...........
So my question:
*Is there any current way using TT that I can set/save variable values for
use once process is finished?*
my $template_attributes = {
device => $params->{device},
result => $result
};
my $expected_result_output;
$template->process(\$expected_result, $template_attributes,
\$expected_result_output)
|| die $template->error();
die(Dumper($template_attributes)); # Can $template_attributes include
'log_date' after the template block is processed?
_______________________________________________
templates mailing list
[email protected]
http://mail.template-toolkit.org/mailman/listinfo/templates