Skip to content

Instantly share code, notes, and snippets.

Created August 7, 2015 16:26
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 anonymous/f538e8a0abcf80fab582 to your computer and use it in GitHub Desktop.
Save anonymous/f538e8a0abcf80fab582 to your computer and use it in GitHub Desktop.
lite.pl
# Automatically enables "strict", "warnings", "utf8" and Perl 5.10 features
use Mojolicious::Lite;
# Route with placeholder
get '/' => sub {
my $c = shift;
$c->render('mypage');
};
# Start the Mojolicious command system
app->start;
__DATA__
@@ wrapper.html.ep
<html>
wrapper begin
<br>
% content
<br>
wrapper finish
</html>
@@ template1.html.ep
%= extends 'wrapper'
template1 begin
% content
template1 finish
@@ mypage.html.ep
%= extends 'template1'
my page content
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment