Template::Perlish

Yet Another Templating system for Perl
Download

Template::Perlish Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Publisher Name:
  • Flavio Poletti
  • Publisher web site:
  • http://search.cpan.org/~polettix/

Template::Perlish Tags


Template::Perlish Description

Yet Another Templating system for Perl Template::Perlish is another templating system for Perl.Developer commentsBecause it's the dream of every Perl programmer, me included. I needed something that's easily portable, with no dependencies apart a recent Perl version (but with some tweaking this should be solved), much in the spirit of the ::Tiny modules. And yes, my dream is to fill that ::Tiny gap some time in the future, but with another module.Wherever possible I try to mimic Template::Toolkit, but I stop quite early. If you only have to fill a template with a bunch of variables, chances are that TT2 templates are good for Template::Perlish as well. If you need even the slightest bit of logic, you'll have to part from TT2 - and get full Perl power.A template is simply a text (even if not necessarily) with some particular markup to embed commands. In particular, all the stuff included between is considered as some sort of command, and treated specially. All the rest is treated as simple text. Of course, you can modify the start and stop delimiter for a command.SYNOPSIS use Template::Perlish; my $tp = Template::Perlish->new(); # A complex template, including some logic as Perl code my $tmpl = 'Ciccio Riccio', items => , uris => , director => { surname => 'Poletti' }, });The above prints: Dear Ciccio Riccio, we are pleased to present you the following items: 1. ciao 2. a 3. tutti 4. quanti Please consult our complete catalog at http://whateeeeever/. Yours, Poletti.There is also a convenience function for one-shot templates: use Template::Perlish qw( render ); my $rendered = render($template, \%variables); Requirements: · Perl


Template::Perlish Related Software