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 <[email protected]>

> 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 <><
> [email protected]
> 269-408-0811
> _______________________________________________
> dancer-users mailing list
> [email protected]
> http://lists.preshweb.co.uk/mailman/listinfo/dancer-users
>
>
_______________________________________________
dancer-users mailing list
[email protected]
http://lists.preshweb.co.uk/mailman/listinfo/dancer-users

Reply via email to