|more useful options|
Comparing HTML::Template::Compiled's compatibility to HTML::Templateby markjugg (Curate)
|on Dec 24, 2005 at 21:04 UTC||Need Help??|
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.