1. I will not be doing the HTML and graphics stuff. I have someone else who will, but he does not use/know Perl. He uses HTML and PHP and a big fan of CSS (as well as myself). So I need something a HTML/PHP developer can work with.

I think that right there, I would choose HTML::Template.

3. I would like to embed the perl code right into the HTML, as much as possible, and would rather not have to learn a new mini-language, like CGI.pm (my personal opinion).

I think this contradicts requirement number 1. Part of the power of splitting perl from HTML is that you can get your friend to do all the display work while you do all the logic work, and you don't collide by working on the same files. Look up "Model, View, Controller" or "MVC".

That's not to say there aren't valid times for embedding logic within a template (we're doing that at work, but not for CGI). Just that when you already have a division of labour, it's really handy if that division matches the files you're using.

2. I want it to be flexible enough to where I can add additional technology down the road (XML stuff for a RSS newsfeed and a cell phone interface).

You can use HTML::Template for creating XML. May not be the best way, but it will be fast. Depending on what else you're using, you'll want a different URL to get the XML/RSS feed than gets the main pages (even if all the difference is that you're getting a special flag). Your XML/RSS generating routine probably just has to use a different input file (rather than "mainpage.html.template", use "mainpage.rss.template"), and you're done. Alternately, you can just generate the entire XML file using tools such as XML::Twig. Although I'm a huge fan of XML::Twig, I probably would stick to HTML::Template for this.

6. A good debugger would be nice.

I'm not sure about how to debug templates... but, by separating the template from the code, I find that it's pretty easy to debug my CGI code at the commandline (my favourite debugger is "perl -d").


In reply to Re: Help With Choosing a Templating System for my Situation by Tanktalus
in thread Help With Choosing a Templating System for my Situation by Anonymous Monk

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.