in reply to RFC: Mojolicious::Lite and Moo: A Very Basic Application Layout
This is even more simple:
use strict; use warnings; use Mojolicious::Lite; get '/' => sub { my $c = shift; $c->stash( nose => $c->param( 'nose' ) || 'karl' ); $c->render( template => 'nose', format => 'xml' ); }; app->start; __DATA__ @@ nose.xml.ep <?xml version="1.0" encoding="UTF-8"?> <myapp> <nose><%= $nose %></nose> </myapp>
I can understand wanting to retain the method you use to create the XML document itself (better validation), but do you really need those objects?
jeffa
L-LL-L--L-LL-L--L-LL-L-- -R--R-RR-R--R-RR-R--R-RR B--B--B--B--B--B--B--B-- H---H---H---H---H---H--- (the triplet paradiddle with high-hat)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: RFC: Mojolicious::Lite and Moo: A Very Basic Application Layout
by karlgoethebier (Abbot) on Aug 05, 2015 at 21:52 UTC |