Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Text::MicroMason

by Aristotle (Chancellor)
on Dec 25, 2005 at 09:55 UTC ( [id://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?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: modulereview [id://518988]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (4)
As of 2024-03-29 08:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found