[Catalyst] Mason view hackers (and other views), PING

Matt S Trout dbix-class at trout.me.uk
Sat May 12 22:09:42 GMT 2007


On Sat, May 12, 2007 at 02:09:31PM -0500, Dave Rolsky wrote:
> 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.

dhandlers largely yes, autohandlers maybe not

plus the component inheritence stuff could be useful.

> 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.

That's one of the things that needs to change, the standard for views is
now $c->action.

-- 
      Matt S Trout       Need help with your Catalyst or DBIx::Class project?
   Technical Director    Want a managed development or deployment platform?
 Shadowcat Systems Ltd.  Contact mst (at) shadowcatsystems.co.uk for a quote
http://chainsawblues.vox.com/             http://www.shadowcatsystems.co.uk/ 



More information about the Catalyst mailing list