in reply to Re: Perl, Web Apps, HTML::Template, HTML::Mason and the future
in thread Perl, Web Apps, HTML::Template, HTML::Mason and the future

Catalyst looks very interesting. I've heard of it before but dismissed it fairly quickly (I didn't know much Perl at the time) DBIx is in. Now just to pick a template system..Template Toolkit seems to be popular. Do you have anything against HTML::Template for simple applications?
  • Comment on Re^2: Perl, Web Apps, HTML::Template, HTML::Mason and the future

Replies are listed 'Best First'.
Re^3: Perl, Web Apps, HTML::Template, HTML::Mason and the future
by almut (Canon) on Jun 12, 2008 at 02:19 UTC

    Templating systems are like religions, so the answer strongly depends on who you ask, or who replies... ;)

    It's probably a good idea to try a few yourself to see which approach you like best.  This classic article might serve as a good introduction.

Re^3: Perl, Web Apps, HTML::Template, HTML::Mason and the future
by CountZero (Bishop) on Jun 12, 2008 at 05:26 UTC
    I have nothing against HTML::Template and I'm quite sure that it can handle much more than simple applications.

    Template::Toolkit on the other hand is a more general templating solution which will equally well handle non-HTML / non-Web matters.

    I use it regularly to write LaTex files which when rendered make nice lay-outed PDF-files. Although not impossible to do, it would require more effort to do so from a less performant templating system.

    Its biggest strength is the way it can handle easily and elegantly, all kinds of data-structures (such as hashes of arrays of hashes of hashes of ...) and can use most of the standard Perl-modules (CGI, DBI, ...) directly from within itself. And before someone complains and starts a holy flame war: this indeed breaks the holy law of division of concerns and allows you to sneak in programming into your display layer, but sometimes it is damn handy to do so ...

    CountZero

    A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James