(A nod to thpfft for his reply: thanks for your points, it's good to hear about experience from like-minded people.)

I did actually have a long look at HTML::Template. I knew that its syntax does not inline Perl and it in general is simplistic; I had even written a few templates using it as I pointed out. The default syntax is just too bulky and not visible enough in a mess of surrounding HTML.

(This is in reply to thpfft as well:) As I kept saying - I was almost about to start on my own templating solution. I couldn't believe noone would ever have felt the same need as I for a powerful but minimalistic language. (See my initial post, ".. it's amazing ..") My look at HTML::Template wasn't enough to discover filters as a way of making it do what I want although I remember seeing passing mention of that in the docs.

I posted here out of desperation - I didn't want to start from scratch and knew I shouldn't, but I couldn't see any way of avoiding it. Thanks for the replies everyone, your help is greatly appreciated :) Another look at HTML::Template it is. Don't worry, I'm not going to pollute CPAN with yet another templating module anytime soon :) (Or any of my code in fact. ;) Though come to think of YATM would be a good name. Hehe.)

Sidenote: performance is not much of an issue in my case since the script is going to spit out static files. In effect it's a 'make' to be invoked via browser; I wish I could use WML, but alas, I don't even have a limited telnet login on the server, and I can't run it locally because I'm not the only one working on the site.


In reply to Re^3: I am about to write my very own templating module.. by Aristotle
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.