in reply to Output should have multiple segments
Mason seems to encourage doing very much work at the template level (or at least the tutorial I once read did), which is why I don't use it.
I also dislike it that in many catalyst tutorials some of the database queries are triggered in from the template.
I can't (yet?) really put my finger on it why it seems wrong, but it just plain feels wrong, and is the reason why I still stick to HTML::Template::Compiled, although it's not as nifty as, for example, Template::Toolkit.
Update: I thought more about why it feels wrong, and one thing that came to my mind is error handling. In Catalyst basically the controller does its work, creates a data structure (in the tutorials mostly DBIx::Class objects), and then hands off all the work to the controller.
But if the template accesses methods from these objects, they can trigger a DB query, which in turn could very well throw an error. But at this point it's too late for the controller to catch it in any meaningful way, since it already made all decisions it has to make.
The only remaining options are
All of them don't sound very convincing to me.
|
|---|