<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="edit-comment-hide">
<div class="comment-body markdown-body markdown-format
js-comment-body">
<p>Hi Everyone,</p>
<p>What I'm looking for is a way to render a template with part
of the results to the user to see while I continue processing
and when I'm done I want to show the final template with all
results. I'm currently using the new delayed method, which
works fine for strings,<br>
but if I want to render templates it does not provide content
until the very end, so no in-between output is produced, as I
would like to show.<br>
Example code here:<br>
</p>
<pre><code>get '/test/:*?' => sub {
my $id = params->{'id'};
my $blub = params->{'blub'};
delayed {
my $tt = Template->new(
{INCLUDE_PATH => "$path",
WRAPPER => 'layout.tt',
RELATIVE => 1,
}) || die "Template error: $Template::ERROR\n";
$tt->process('view.tt', {
'id' => $id,
'bla' => $blub
};
content $tt;
### Process further
push my @more, "String";
my $tt2 = Template->new(
{INCLUDE_PATH => "$path",
WRAPPER => 'layout.tt',
RELATIVE => 1,
}) || die "Template error: $Template::ERROR\n";
$tt2->process('view.tt', {
'id' => $id,
'bla' => $blub,
'more' => \@more
};
content $tt2;
done;
};
};
</code></pre>
Is this possible or am I completely on the wrong track?<br>
Thanks,<br>
Joerg<br>
<br>
</div>
Phone: +43 1 4277 52732 </div>
</body>
</html>