++ed by:

1 non-PAUSE user.

Satoshi Azuma
and 1 contributors


Nephia::MetaTemplate - Meta Template Processor for Nephia::Setup flavors


A template in your flavor.

    <title>[= title =]</title>
      <h1>Access to value: [= title =]</h1>
      <h2>Access to nested value: [= author.name =]</h2>

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.

    <title>{{ val:title }}</title>
      <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>


Nephia::MetaTemplate is a Meta-Template Processor for helping you make your own nephia flavor.


ytnobody <ytnobody@gmail.com>