Nephia::MetaTemplate - Meta Template Processor for Nephia::Setup flavors
A template in your flavor.
<html> <head> <title>[= title =]</title> </head> </html> <body> <h1>Access to value: [= title =]</h1> <h2>Access to nested value: [= author.name =]</h2> </body> </html>
And, in your flavor class.
my $meta_template = '<html>...'; # meta template string my $mt = Nephia::MetaTemplate->new( tag => '{{ ... }}', arrow => '@', argument => 'val:...', replace_table => [ qr|</body>| => '</body><script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>', ], ); my $template = $mt->process($meta_template);
Then, $template is like as following.
<html> <head> <title>{{ val:title }}</title> </head> </html> <body> <h1>Access to value: {{ val:title }}</h1> <h2>Access to nested value: {{ val:author@name }}</h2> </body><script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script> </html>
Nephia::MetaTemplate is a Meta-Template Processor for helping you make your own nephia flavor.
ytnobody <ytnobody@gmail.com>
ytnobody
To install Nephia, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Nephia
CPAN shell
perl -MCPAN -e shell install Nephia
For more information on module installation, please visit the detailed CPAN module installation guide.