By heart, so forgive me if this does not pass, but I think it does:

  my $template_engine = engine('template');

And you go from there

Good luck!


2013/5/21 Jeff Boes <jeff@endpoint.com>
What is the Dancer2 equivalent to the following?

my $html = Dancer::Template->engine->apply_renderer($view, $vars);

This is happening outside of a route handler, so my first attempt:

my $html = template($view, $vars);

incurred this:

Function 'template' must be called from a route handler

--
Jeff Boes <><
jeff@endpoint.com
269-408-0811
_______________________________________________
dancer-users mailing list
dancer-users@dancer.pm
http://lists.preshweb.co.uk/mailman/listinfo/dancer-users