[Catalyst] Mason view hackers (and other views), PING
Dave Rolsky
autarch at urth.org
Sat May 12 20:09:31 GMT 2007
On Sat, 12 May 2007, Matt S Trout wrote:
> Something I'd be delighted if you'd have a think about: how to make Mason
> use intelligent search paths for Chained actions - the autohandler/dhandler
> etc. system is beautiful but it'll need a smart mapping from the cat actions
> onto the mason paths to really make it go for Cat users.
I'm not sure I follow.
In my opinion, the dhandler portion of Mason is entirely superfluous when
using Catalyst. Catalyst already provides many dispatch options to do
similar things, including default() methods in your controller, which act
more or less exactly like dhandlers. I always kind of assumed default()
and auto() had been inspired by Mason, because they work so much like
Mason does.
The autohandler stuff is still really useful, but I just use it for
wrapping header/footers or path-specific menus around the called
component.
I guess my take on it is that you do the dispatching part in your
controller, and as part of that, you should also decide what component to
call for the view. The default for this in the Mason view seems to be the
same as that in the TT2 view, which is to use $c->req->match. That seems
reasonable to me.
-dave
/*===================================================
VegGuide.Org www.BookIRead.com
Your guide to all that's veg. My book blog
===================================================*/
More information about the Catalyst
mailing list