[Catalyst] Re: Request paths - rejoining Chained actions together.
bobtfish at bobtfish.net
Mon May 12 01:20:17 BST 2008
On 11 May 2008, at 15:18, Matt S Trout wrote:
> On Sun, May 11, 2008 at 10:01:47AM +0100, Tomas Doran wrote:
>> 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
I didn't really mean it wasn't possible - just that it was harder
than just a bit of fiddling with C::DT::Chained (the hardest part of
which, to make it 'look like' it's working, for the simple case, is
getting the debug table right ;) )
> The trick is to provide some way to disambiguate - either a
> preferred path
> (which could vary between controllers, say) or maybe passing an
> of action objects indicating the precise chain.
The idea of uri_for having a method of passing uri_for hints which
are only valid in one context (i.e. Chained) kinda smells to me, but
then implicit behind the scenes magic also scares me... Hmm, I'll
have a think / play some more.
> 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
> base class + N controllers approach isn't really any more typing
> which is why I've not given this much time yet.
That's totally fair, I'll see how $ork's problem space expands in the
next couple of iterations of the code, as I think this is a problem
that I'm going to see again when I start exposing more complex
objects - if that gets to a point of being painful with inheritance,
then I'll re-visit this.
More information about the Catalyst