This is a template system for both client and server side.
.soy files to Perl 5 codeIn early development stage: http://github.com/zag/p5-plosurin
Experimental: http://github.com/zag/plosurin
Have template example.soy with content:
{namespace mytest}
/**
* Simple test
*/
{template .Hello}
<h1>Foreach example</h1>
{foreach $a in [1,2]}
<p>Line: {$a}</p><br/>
{/foreach}
<p>Ok</p>
{/template}
To get Perl 5 module (MyApp, for example), just run the following command:
plosurin.p5 -package MyApp < example.soy > MyApp.pm
Use template in your Perl 5 program:
use MyApp;
print &MyApp::mytest_Hello();
or get help:
perldoc MyApp.pm