Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris


by Aristotle (Chancellor)
on Dec 25, 2005 at 09:55 UTC ( #518988=modulereview: print w/replies, xml ) Need Help??

Item Description: A fast, lightweight, excellently documented und unbelievably painful to use template engine.

Review Synopsis:

I really, really wanted to like this module. The documentation is great, the interface is bliss, the Mason syntax is cool, and having multiple syntaxes is excellent.

Unfortunately, my experience was so painful that I gave up after a day of using it. Maybe it would have been different if I had come to it with a blank slate, but that is not my situation: I am currently getting increasingly fed up with Template Toolkitís crippled mini language (a rant for another day), so I was looking for a different system that would let me use Perl in my templates.

I have a batch of templates that need to be ported Ė but that has proven absolutely impossible. The error reporting is so indescribably abysmal that the excercise turned out worse than pulling teeth. Some errors segfaulted perl! I have no idea what the precise problem was, I gave up much before I could triangulate its exact location in the template. And triangulate I had to: simple template syntax errors result in nothing but an error on the line in your own code which invokes the compiled template; grave errors produce an enigmatic error from deep in the bowels of the module. If youíre lucky, thereís a dump of generated, hard to read Perl code from which you can try to decipher the problem. If youíre particularly unlucky, you get a segfault.

Now, Iím possibly an outlier. Itís quite conceivable that these problems are far less of an issue when youíre starting from scratch with an empty file, instead of trying to port an existing template from one syntax to another by applying incremental search-and-replace patches and then running the result to see what breaks. But this experience still makes me wary for maintenance programmers who come in months after the fact to tweak a template.

Replies are listed 'Best First'.
Re: Text::MicroMason
by simonm (Vicar) on Jan 03, 2008 at 19:13 UTC
    It's obviously too late to help the original poster, but for what it's worth, the latest versions of Text::MicroMason include support for a "-LineNumbers" option that should significantly improve this kind of error reporting, by including accurate line numbers matching the source template. I'm not sure what was causing the segfaults reported above, and that problem may still exist, but in the more common case of routine syntax errors or run-time exceptions, the above fix should help significantly. -Simon
Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: modulereview [id://518988]
and a soft breeze sighs...

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (5)
As of 2017-01-21 16:14 GMT
Find Nodes?
    Voting Booth?
    Do you watch meteor showers?

    Results (185 votes). Check out past polls.