in reply to current route of perl dancer
Also note that "template variables" can be very powerful things indeed, if you equate them to anonymous subroutines e.g. ... => sub { do something here ... }. (A subroutine reference may be required.) This usage will execute code every time the variable is referenced in the template, not just prior to displaying the template.