Template engine compatible with HTML::Template syntax and Perl/JavaScript source code output
Perl
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
bench
lib/Template
script
t
README.pod

README.pod

NAME

Template::Meepo - Compile HTML::Template templates into Perl or JavaScript code

SYNOPSIS

General usage

use Template::Meepo;

my $coderef = Template::Meepo::poof($template);

die $@ if $@;

print (eval $$coderef)->($parameters);

Build context

$Template::Meepo::context->{'builder'} = 'JavaScript';
$coderef = Template::Meepo::poof($template);

Optional parameters

$coderef = Template::Meepo::poof($template => {
        builder => 'JavaScript',
        inc => ['/home/user/templates', '../templates'],
});

Object notation

$coderef = Template::Meepo->poof({
        source => $template,
});

DESCRIPTION

This module parses template files and creates parse tree. Depending on selected builder Perl or JavaScript code is generated.

Generated code can be compiled to anonymous function and run as needed.

SEE ALSO

HTML::Template::Pro, HTML::Template

COPYRIGHT & LICENSE

Copyright 2012 Alexander Nazarov, all rights reserved.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.