Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

+ -

  Comment: Template Toolkit for Mojo (Score 1) on 2010.04.21 0:54

by ask on 2010.04.21 0:54 (#71906)
Attached to: Mojo vs Dancer Week 2 - Templates and Images

I'm not sure what your rules are for installing extensions for the framework, but there's a TT renderer for Mojo:

(Install it, add the lines from the synopsis to your startup() method and name your templates

With Mojolicious::Lite I think it'd be something like

              use MojoX::Renderer::TT;
              my $tt = MojoX::Renderer::TT->build(
                        mojo => app,

              app->renderer->add_handler( tt => $tt );

Read More 11 comments
Comments: 11
+ -

  Comment: Re:Really? (Score 1) on 2009.08.03 18:02

by ask on 2009.08.03 18:02 (#69851)
Attached to: Mojolicious::Lite

Most of the "reinventing" is very thoughtfully done - and in surprisingly little code.

The template thing is indeed a little silly; but it's a very simple template module and Mojolicious has extensive support for plugging in other "renderers" (a bunch already exist on CPAN).

It's all trade-offs (of course).

With Catalyst there's a good deal of "having to learn the underlying bits" to really understand what's going on. In Mojo there's less code and it's more internally consistent.

(That being said, I do think it'd be nicer if Mojo used Moose instead of its own very basic base class).

Read More 29 comments
Comments: 29
+ -

  Comment: Re:More Sinatra's offsprings in Perl? (Score 1) on 2009.08.03 17:57

by ask on 2009.08.03 17:57 (#69850)
Attached to: Mojolicious::Lite

Uh, that's a little unfair. I've been using Mojo since November last year and it from the git log you only put Dancer on github a few weeks ago.

Mojolicious::Lite is just a variant on the Mojolicious code to allow you to have apps in one file, like you have in Dancer. It's not a fork.

Read More 29 comments
Comments: 29