Created
December 26, 2012 14:54
-
-
Save jberger/4380740 to your computer and use it in GitHub Desktop.
Mojolicious::Plugin::Humane example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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