What's the best Perl templating system?


Ha ha, trick question, there is no "best" templating system except for the one that's best for your project. Vince Veselosky has a roundup of Perl templating systems where he examines everything....

... from the Swiss Army Chainsaw of Template Toolkit, through HTML::Mason and Text::Template down to the ever-tempting "variables interpolated in a here-doc" method.... Read on for a comparison of the major template systems in Perl, and my recommendations of which systems fit which circumstances.

It's a fine introduction to the various systems, and probably worth pointing to from the Perl 5 wiki, if not reproducing it there entirely.


I also keep my templating comparison updated at http://perl.apache.org/docs/tutorials/tmpl/comparison/comparison.html. I need to update it again soon to add coverage of Template::Alloy, which has matured enough to include.

I am using Clearsilver and pretty happy with it.

It's C based, has a Data set approach to fill the template. Perl side is, well... Perlish. It doesn't have the whole C interface but with Inline::C it would be very easy to extend if one wants to use it.

I haven't used it in a mod_perl environment, fastcgi seems to be working.

If the application needs optimizations, one could easily create a Prototype with Perl, and then conver t to C using this prototype as a guide.

I am not sure but Clearsilver is being used in Google & Yahoo groups.

ClearSilver is not being used by Yahoo. According to Rasmus Lerdorf, they've replaced it with PHP. I did read something about Google Groups using it a few years ago.

Seems from what I have seen, the top 2 are TT and HT.

Leave a comment

Job hunting for programmers

Land the Tech Job You Love, Andy Lester's guide to job hunting for programmers and other technical professionals, is available in PDF, ePub and .mobi formats, all DRM-free, as well as good old-fashioned paper.