Text::MicroMason::Docs::Related - A Brief Survey of Templating Modules
Text::MicroMason is just one of dozens (or hundreds) of templating distributions on CPAN.
This document mentions a few related modules and includes a brief discussion of some similarities and differences among them.
For a more authoritative discussion, see Perrin Harkins' classic article at http://www.perl.com/lpt/a/2001/08/21/templating.html.
For reference, here's a slightly mangled version of the comparison matrix at the conclusion of that article:
Scope Style Parsing Language HTML::Mason Framework Callback Compiled Perl HTML::Embperl Framework Callback Compiled Perl Apache::ASP Framework Callback Compiled Perl and XSL AxKit Framework Pipeline Compiled or Perl, XSL and Cached Parse Mini-Languages SSI Templates Callback Repeated Parse Mini-Language Template Tlkit Templates Pipeline Compiled Mini-Language HTML::Template Templates Pipeline Cached Parse Mini-Language Text::Template Templates Pipeline Compiled Perl
There are serveral ways we can differentiate between templating systems:
Some templating systems use Perl syntax for both interpolated expressions and flow control, including Text::Template, Template::Perl, and Text::ScriptTemplate.
Others use "little languages", including Template::Toolkit and HTML::Template.
Some templating systems just provide functions to fill in templates, like Text::Template.
Others are part of full-blown web application frameworks like Apache::ASP, ePerl, HTML::Embperl, and HTML::Mason.
Some templating systems are not particularly configurable or extensible.
Others support various kinds of extensions, including Template::Toolkit, HTML::Mason and Text::MicroMason.
Some templating systems repeatedly parse the template from scratch every time it is used.
Others parse the template into an intermediate data structure and then iterate over that each time the template is used.
Others convert the template into equivalent Perl source code which can be compiled into a directly-executable subroutine and used repeatedly, including HTML::Mason and Text::MicroMason.
For an emulation for Apache::ASP, see Text::MicroMason::ServerPages.
For an emulation for Embperl, see Text::MicroMason::Embperl.
For an emulation for HTML::Template, see Text::MicroMason::HTMLTemplate.
See also HTML::Template::Compiled.
For an emulation for HTML::Mason, see Text::MicroMason::HTMLMason.
(If you've already got HTML::Mason installed, configured, and loaded into your process, you're probably better off using it rather than this package. HTML::Mason's $interp->make_component() method allows you to parse a text string without saving it to disk first.)
$interp->make_component()
For an emulation for PLP, see Text::MicroMason::PLP.
For an emulation for Text::Template, see Text::MicroMason::TextTemplate.
For distribution, installation, support, copyright and license information, see Text::MicroMason::Docs::ReadMe.
To install Text::MicroMason, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Text::MicroMason
CPAN shell
perl -MCPAN -e shell install Text::MicroMason
For more information on module installation, please visit the detailed CPAN module installation guide.