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 <%= $nose %>