in reply to Mojolicious and HTML::Template

How to use HTML::Template instead of EP template in Mojolicious?

I don't understand the question :)

What is wrong with this?

my $template = HTML::Template->new(filename => 'test.tmpl'); ...

Replies are listed 'Best First'.
Re^2: Mojolicious and HTML::Template
by moritz (Cardinal) on Jul 26, 2011 at 07:37 UTC

    What's wrong with it? Mojolicious is a framework that does the template locating and rendering for you, so a normal user of the framework never both with initializing a template object.

    Instead one write a Mojolicious::Plugin::HTMLTemplateRenderer plugin which does all the rendering boilerplate, and then just use this plugin in the mojolicious application.

    I've never written such a plugin, but there are plenty examples on CPAN that you can use as templates.

Re^2: Mojolicious and HTML::Template
by Anonymous Monk on Jul 26, 2011 at 07:33 UTC
      Thank You! That is what i need!