cLive ;-) has asked for the wisdom of the Perl Monks concerning the following question:

EDIT: I worked it out. I thought Dancer2 defaulted to Template::Toolkit. It doesn't. Once I switched the templating engine, it worked as expected.

I'm making a simple Dancer2 App. I have the following data getting sent to the template:
template 'my_template', { ed => $ed, ad => $ad, voters => [ { 'lastname' => 'SCHMO', 'firstname' => 'JOE' }, { 'firstname' => 'SCHMO', 'lastname' => 'JIM' } ], };

And in the template I have:

<p>ed: <% ed %><br/> ad: <% ad %></p> <table> <tr> <th>First</th> <th>Last</th> </tr> <% FOREACH voter IN voters %> <tr> <td><% voter.firstname %></td> <td><% voter.lastname %></td> </tr> <% END %> </table>

When I load the view though, I see $ed and $ad, but all I see where I expect to see the voters is a bunch of HASH(0x409acc8) interpolations.

What am I doing wrong? It's probably something simple, but I can't see it. Any ideas?