I was excited to see the arrival of HTML::Template::Compiled. It brought a number of additional features I was I was interested in, while still holding to the HTML::Template philosophy from my perspective.

I did my own analysis to check the compatibility, which I'm sharing here in case it's of interest to others.

I wanted to see how HTML::Template::Compiled (HTC) would do when run against theHTML::Template test suite.

To test this, I copied over the test suite from HTML::Template 2.8 (just released), and did a find and replace of HTML::Template to HTML::Template::Compiled.

I expected some failures, because there are a few documented differences.

I was surprised by the results-- HTML::Template::Compiled passed all the tests but two kinds. One were the tests for "query()", which I don't use and is documented not to be implemented yet (but is planned). The other failed test was a brand new one added in 2.8, the "else else bug" test. This is really a test for how H::T responds to a bad template, rather than a feature compatibility test. HTC actually had a better response than H::T 2.7 did-- it died with a syntax error instead of silently allowing the bad token through.

As I reviewed the results, I realized too few tests failed. Or rather, HTML::Template is missing some tests in the first place. For example, HTC doesn't bother with "die_on_bad_params" (I haven't bothered with it myself in years). So, those tests from the H::T suite should have failed, but they didn't. HTML::Template has no tests for that.

HTML::Template::Compiled is an exciting project to follow.

Recently I worked to bring TT's dot notation to HTML::Template. Since HTML::Template doesn't support plugins, I first had to create a HTML::Template::Pluggable subclass to allow plugins, and then write HTML::Template::Plugin::Dot to add the functionality.

HTML::Template::Compiled as a feature like this built in, and I can load one module to use instead of three, and have better performance to boot!

While I expect to do further evaluation before deploying a major project with this newcomer, I do encourage others to evaluate this HTML::Template alternative.


In reply to Comparing HTML::Template::Compiled's compatibility to HTML::Template by markjugg

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.