Text::NeatTemplate

Text::NeatTemplate is a fast, middleweight template engine.
Download

Text::NeatTemplate Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Kathryn Andersen
  • Publisher web site:
  • http://search.cpan.org/~rubykat/Module-Starter-Plugin-Template-TeTe-0.05/lib/Module/Starter/Plugin/Template/TeTe.pm

Text::NeatTemplate Tags


Text::NeatTemplate Description

Text::NeatTemplate is a fast, middleweight template engine. Text::NeatTemplate is a fast, middleweight template engine.SYNOPSIS use Text::NeatTemplate; my $tobj = Text::NeatTemplate->new(); $result = $tobj->fill_in(data_hash=>ta, show_names=>%names, template=>$text);This module provides a simple, middleweight but fast template engine, for when you need speed rather than complex features, yet need more features than simple variable substitution.Markup FormatThe markup format is as follows:{$varname}A variable; will display the value of the variable, or nothing if that value is empty.{$varname:format}A formatted variable; will apply the formatting directive(s) to the value before displaying it.{?varname stuff more stuff}A conditional. If the value of 'varname' is not empty, this will display "stuff value-of-variable more stuff"; otherwise it displays nothing. {?var1 stuff thing }This would use both the values of var1 and var2 if var1 is not empty.{?varname stuff more stuff!!other stuff}A conditional with "else". If the value of 'varname' is not empty, this will display "stuff value-of-variable more stuff"; otherwise it displays "other stuff".This version can likewise use multiple variables in its display parts. {?var1 stuff thing !!}{&funcname(arg1,...,argN)}Call a function with the given args; the return value of the function will be what is put in its place. {&MyPackage::myfunc(stuff,)}This would call the function myfunc in the package MyPackage, with the arguments "stuff", and the value of var1.Note, of course, that if you have a more complicated function and are processing much data, this will slow things down. Requirements: · Perl


Text::NeatTemplate Related Software