Skip to content

Instantly share code, notes, and snippets.

@miyagawa
Created May 4, 2011 05:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save miyagawa/954786 to your computer and use it in GitHub Desktop.
Save miyagawa/954786 to your computer and use it in GitHub Desktop.
package foo;
use Mojolicious::Lite;
# /bar
get '/bar' => sub {
my $self = shift;
warn $self->app->renderer->_detect_template_class;
$self->stash(one => 23);
$self->render('baz', two => 24);
};
app->start;
__DATA__
@@ baz.html.ep
The magic numbers are <%= $one %> and <%= $two %>.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment