<p dir="ltr">For this to work, you'd either need a template engine that is tightly integrated into Dancer or a streaming template engine (that would call a callback to call content as it got chunks) with the ability to loop over iterators or trigger callbacks to get more data to format. Though I guess you could use a normal template loop over a tied array too.</p>
<p dir="ltr">But I don't know of such a template engine.</p>