NOOOOOOO!!! I go out for one drink and this is what happens?!

First of all, have you read the article I wrote on templating systems? If not, it might give you some perspective, even though it doesn't go into great depth on each system.

Second, I think you are being unfair to the available options, especially HTML::Template and Template Toolkit. You're critizing them for having syntax that's too complex. How do you intend to make templates that have looping and complex variables but are simpler than this?

[% FOREACH foo %] ...some HTML... [% bar.baz %] ...some HTML... [% END %]
If you're worried about all the other things you could do in Template Toolkit, either don't use them or use HTML::Template which intentionally limits the instruction set even further.

The most important thing is your motivation for doing this. If you're doing it to try writing a parser and to have some fun hacking tricky regex code, then by all means go ahead. On the other hand, if you're doing this for a purely practical purpose or to contribute to CPAN, please take another look at the available tools.


In reply to Re: I am about to write my very own templating module.. by perrin
in thread I am about to write my very own templating module.. by Aristotle

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.