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

Matt S Trout dbix-class at trout.me.uk
Sun May 13 03:06:07 GMT 2007


On Sat, May 12, 2007 at 03:51:00PM -0700, mreece at vinq.com wrote:
> > On Sat, 12 May 2007, Matt S Trout wrote:
> > [...]
> >>> 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.
> >
> > Easy enough to fix.
> >
> >
> > -dave
> 
> fwiw, this is what i use as my default:
> 
>   $c->stash->{template} = $c->action->namespace . '/'
>       . $c->action->name . '.html';

That's entirely equivalent to $c->atcion.'.html'

So if Mason adopted a configurable suffix for the default ala TT you'd
get that for free.

> but i don't know how well that plays with chained actions.

Chained endpoints have a private path just like everything else.

I'm not entirely sure what $c->req->match ends up as for them, that's
basically preserved only for back compat with unmaintained code and I have
no idea what I did with it when writing ::Chained.

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