in reply to Templating suggestions for code generation

I may have complety missed the mark, but have you looked at the Text::Template module?

In particular, what your decribing made me think of the Philosophy section of Dominus' module.

Of the three templating modules I played with, the other two being HTML::Template, Template::Toolkit, it had the smallest learning curve and the (to my mind) greatest flexibility. Worth a look if you haven't already.


Examine what is said, not who speaks.
Silence betokens consent.
Love the truth but pardon error.
  • Comment on Re: Templating suggestions for code generation

Replies are listed 'Best First'.
Re^2: Templating suggestions for code generation
by dragonchild (Archbishop) on Feb 17, 2005 at 14:28 UTC
    I work with an application that uses Text::Template and, having worked with the others as well, I must say that Text::Template is the worst templating module I've ever used. There is a ton of business code within the templates, logic that is just abysmal, and no separation of concerns.

    While I understand the drive that Dominus had to build Text::Template, the amount of self-discipline required to successfully use it boggles the mind, especially when alternatives that help provide that discipline for you exist. I simply cannot recommend its usage in any application.

    Being right, does not endow the right to be rude; politeness costs nothing.
    Being unknowing, is not the same as being stupid.
    Expressing a contrary opinion, whether to the individual or the group, is more often a sign of deeper thought than of cantankerous belligerence.
    Do not mistake your goals as the only goals; your opinion as the only opinion; your confidence as correctness. Saying you know better is not the same as explaining you know better.

      I think I might agree with you if your application is a web application where the drive to keep business logic out of the html is a priority, but reading Bart's OP, that did not seem to be the case here.


      Examine what is said, not who speaks.
      Silence betokens consent.
      Love the truth but pardon error.