in reply to Code and html separation - always or mostly doable?

I am suprised no one has really recommended Text::Template written by Mark-Jason Dominus. The best thing about this module is the templating logic is Perl, not some made up something else to learn.

I like to break out my display logic into a separate file, so I have code, display logic, and template. The template only contains output variables (so webdesigners don't have to mess with logic elements) and it gives me the power to change the template based on display logic. So I can deliver HTML, plain text, XML or whatever, I can also internationalize output easily with this method.

g_White
  • Comment on Re: Code and html separation - always or mostly doable?

Replies are listed 'Best First'.
Re^2: Code and html separation - always or mostly doable?
by eserte (Deacon) on Jun 18, 2004 at 17:29 UTC
    Just for completness, there's also Text::ScriptTemplate which is a simple templating system with asp/jsp-like tags and also uses perl for the template logic. I wonder if somebody tried both Text::ScriptTemplate and Text::Template and can tell which one is to prefer.