Skip to content

Instantly share code, notes, and snippets.

@jberger
Created December 26, 2012 14:54
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 jberger/4380740 to your computer and use it in GitHub Desktop.
Save jberger/4380740 to your computer and use it in GitHub Desktop.
Mojolicious::Plugin::Humane example
#!/usr/bin/env perl
use Mojolicious::Lite;
plugin 'Humane';
get '/' => sub {
my $self = shift;
$self->humane_stash( 'Welcome Back!' );
$self->render( 'simple' );
};
app->start;
__DATA__
@@ simple.html.ep
<!DOCTYPE html>
<html>
<head><title>Simple</title></head>
<body>
Hello World
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment