This is an article I presented at TPC5 in San Diego. It may help you if you're trying to sort out the different templating options available for Perl. It is mostly focused on building web applications.

Choosing a Templating System

UPDATE: This article has just been featured on You may prefer the layout there.

Replies are listed 'Best First'.
Re: Choosing a Templating System
by Starky (Chaplain) on Aug 15, 2001 at 23:53 UTC
    Thank you! That's something that will be of great value to people. I hear folks asking about templating in Perl quite frequently, and they are often intimidated by the number and type of options.

    I have 2 comments:

    1) Something really needed in the community is a full-scale book on building web applications using Perl a step above simple CGI scripts. That is, a book focusing on available application server framworks such as PAS or Mason for building small-to-mid sized, robust and scalable templated web applications. (Hint, hint!)

    2) If you have occasion to give the presentation again, I would suggest you take a look at Text::Templar. The documentation is excellent, and I've found it a pleasure to work with.

    Again, thanks!

      Thanks for the feedback. FYI, O'Reilly has a Mason book in the works, and SAMS has a mod_perl book coming out that will include some info on templating tools.

      UPDATE: I've just looked at Text::Templar, and I don't see anything there that isn't done (better) by Template Toolkit. Similarly, PAS seems to be a less mature clone of Apache::ASP/Mason/Embperl, and contrary to what the authors imply, I don't see it having any real advantages over those systems. In my opinion, these people would be better off contributing their time to one of the more mature projects rather than duplicating them. Even if there is something that isn't covered by existing systems, adding it would probably be easier than reinventing this entire wheel.

      Don't get me wrong: writing a templating system is fun, and everyone should try it. We just don't need all of them on CPAN and Sourceforge.

(MeowChow) Re: Choosing a Templating System
by MeowChow (Vicar) on Aug 16, 2001 at 00:53 UTC
    It would be nice if the full text of this article was in the tutorials section. With yours and our editors' permission, I would that it were so.
                   s aamecha.s a..a\u$&owag.print
      The trouble is, then I'd have mutiple places to update it, and I do plan to update it. It's a lot easier just to link to it from here.
        That was a very good article. I have a few questions
        1. You said you were biased. Which one is your favorite?
        2. If the Perl Gods decreed that there were no more templating systems to be created and no new functionality to be added to existing ones save for security and bug fixes and that you had to choose one templating system to use for the rest of your life, which one would you choose, at this point in time?
        3. Maintainability may be difficult to define, but part of it is being able to quickly read and learn another programmers code. Which one would you choose for maintainability assuming you will be handing the application off to someone who is as good or better then you at coding?
        4. Which one would you choose for ease of learning but at the same time gives the biggest return for time spent on using it?
        I don't think these are simple questions and they could be more well defined and I'm sure the answers could be long and detailed. I'm just looking for a simple, direct and unfiltered bias. I only have time to learn one and I don't have time to maintain it. (The assumption here is standardized, "well writen" code) So which one would you choose?