[Catalyst] Re: Request paths - rejoining Chained actions together.

Matt S Trout dbix-class at trout.me.uk
Sun May 11 15:18:35 BST 2008

On Sun, May 11, 2008 at 10:01:47AM +0100, Tomas Doran wrote:
> On 10 May 2008, at 15:26, Aristotle Pagaltzis wrote:
> >* Tomas Doran <bobtfish at bobtfish.net> [2008-05-10 09:25]:
> >>If I was to hack some code (and tests) up which supported my
> >>originally suggested syntax ( Chained('sub1', 'sub2') for
> >>joining chains), what would anyone feel about it?
> >
> >You could no longer make `uri_for` work in the general case if
> >you did that.
> Aha! I had a feeling the reason that someone didn't do that already  
> is that there was a compelling reason to not do so - I just hadn't  
> thought about it hard enough..

That's a compelling reason not to rush in, but I still think it's possible.

The trick is to provide some way to disambiguate - either a preferred path
(which could vary between controllers, say) or maybe passing an arrayref
of action objects indicating the precise chain.

Have a think about it and see about an RFC if you're still interested; the
trouble is the extra bookkeeping rapidly gets us to the point where the
base class + N controllers approach isn't really any more typing anyway,
which is why I've not given this much time yet.

      Matt S Trout       Need help with your Catalyst or DBIx::Class project?
   Technical Director                    http://www.shadowcat.co.uk/catalyst/
 Shadowcat Systems Ltd.  Want a managed development or deployment platform?
http://chainsawblues.vox.com/            http://www.shadowcat.co.uk/servers/

More information about the Catalyst mailing list