<?xml version="1.0" encoding="windows-1252"?>
<node id="33296" title="Text::Template" created="2000-09-20 15:00:25" updated="2005-08-15 10:07:13">
<type id="31663">
modulereview</type>
<author id="9346">
mirod</author>
<data>
<field name="doctext">
&lt;h3&gt;Description&lt;/h3&gt;
&lt;p&gt;&lt;a href="http://search.cpan.org/doc/MJD/Text-Template-1.23/Template.pm"&gt;
   Text::Template&lt;/a&gt; let's you store templates in separate
   files. &lt;/p&gt;
   &lt;ul&gt;
     &lt;li&gt;the templates can be anything, typically pure text
        (like email message templates) or HTML.&lt;/li&gt;
     &lt;li&gt;the templates can include Perl code, between 2 
         matching { } (you can change the delimiter if you 
         want to.&lt;/li&gt;
     &lt;li&gt;you can pass variables to the template, usually in
         a separate package (&lt;tt&gt;my&lt;/tt&gt; variables won't be
         passed to the template)&lt;/li&gt;
     &lt;li&gt;you can trap errors when filling the standard with
         a custom handler.&lt;/li&gt;
   &lt;/ul&gt;
&lt;h3&gt;Why use Text::Template&lt;/h3&gt;
&lt;p&gt;Warning: Text::Template is the only templating module I
   use, so I cannot compare it with other similar modules.&lt;/p&gt;
  &lt;ul&gt;
    &lt;li&gt;it works just fine, I never did anything too fancy 
        with it, but I never found a bug in it&lt;/li&gt;
    &lt;li&gt;it is quite powerful: you can change the delimiters,
        evaluate the template in a safe environment, add
        custom code (like common subroutines) to existing
        templates...&lt;/li&gt;
    &lt;li&gt;the documentation is very good&lt;/li&gt;
  &lt;/ul&gt;
&lt;h3&gt;Why NOT use Text::Template&lt;/h3&gt;
  &lt;ul&gt;
    &lt;li&gt;you prefer an other module&lt;/li&gt;
  &lt;/ul&gt;
&lt;h3&gt;Personal Notes&lt;/h3&gt;
&lt;p&gt;Text::Template is a no-brainer, it is powerful enough to
   handle most needs and won't cause you any trouble. Get it
   now!&lt;/p&gt;</field>
<field name="itemdescription">
A module that fills-in templates including Perl code</field>
<field name="usercomment">
Stable and powerful, my template module of choice</field>
<field name="identifier">
</field>
</data>
</node>
