NAME
Tatsumaki::Template::Markapl - Use Markapl as Tatsumaki's template system.
VERSION
version 0.1
DESCRIPTION
This module will use Markapl as Tatsumaki's template system.
SYNOPSIS
# This usually is in app.psgi
use Tatsumaki::Template::Markapl;
# Install the template system
Tatsumaki::Template::Markapl->rewrite('MyProj::View');
And then in MyProj::View
:
# MyProj::View
package MyProj::View;
use Markapl;
template '/' => sub {
my $self = shift;
html {
head {
title { 'My Title' };
};
body {
div('#bd') {
outs('Hello, ');
outs($self->get('name'));
};
};
};
};
Now you can use it in handler:
#
package MyProj::Handler::Index;
sub get {
shift->render('/', {name => 'perl'});
};
AUTHOR
Gea-Suan Lin, <gslin at gslin.org>
LICENSE AND COPYRIGHT
Copyright 2011 Gea-Suan Lin.
This software is released under 3-clause BSD license. See http://www.opensource.org/licenses/bsd-license.php for more information.