[Catalyst] Request paths - rejoining Chained actions together.

Tomas Doran bobtfish at bobtfish.net
Sat May 10 08:10:50 BST 2008

On 9 May 2008, at 15:55, J. Shirley wrote:

> On Fri, May 9, 2008 at 5:00 AM, Tomas Doran <bobtfish at bobtfish.net>  
> wrote:
>> Some example URLs:
>> /volume/*/track/*/format/*
>> /track/*format/*
>> <snip>
>> sub format : Chained('tracksequence', 'trackonvolume') PathPart 
>> ('format')
>> Args(1) {}
>> But this doesn't work...
>> <snip>
> It sounds like your actions are capture arguments, rather than
> separate midpoints (since they're working on the same resource,
> anyway).
> If you have someoperation as a CaptureArg, and stick that away in the
> stash to perform the action later in the chain, you should get what
> you want.

I see what you mean, but that means I have to do a reasonable amount  
of error handling myself, as there are only a few sets of actions  
which are valid..

Also, the number of arguments to access a resource can vary..

My URLs are of the form:


Looking up by the canonical identifier, and another identifier are  
also actually different operations, so it'd be nice to be able to  
split them, but more to the point what you suggested just won't work,  
as I can't just say CaptureArgs(4) - as there can be different  
numbers of arguments for various points to join..

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?


More information about the Catalyst mailing list