We've got a catalyst app that involves a few magic prefix paths
which alter the behavior of things for the rest of the application,
but which can basically go before any other path in the system. So to
handle this with the minimum of effort when we get a request to one of
these paths we just put some stuff in the stash, and then chop our
prefix off the path and then re-run the request by calling $c->go(),
so something like this:

my $path = '/'.join '/', @rest_of_path;


$c->go($c->action, $c->request->args, $c->request->captures);

This all seems to work fine enough, except that all the "chained"
handlers (apart from the endpoints) seem to get called twice. I've
included a little test-app to illustrate this.

Is this just happening because this is a dumb way of doing things or
is there something broken here?


Gmail is watching you!!!!!!

Please don't publish this email address or use it for anything SPAM
risky. My more public email address is [email protected]
-------------- next part --------------
A non-text attachment was scrubbed...
Name: go_chain.tbz
Type: application/octet-stream
Size: 770 bytes
Desc: not available
Url : http://lists.scsys.co.uk/pipermail/catalyst/attachments/20090424/46ba24bd/go_chain.obj

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupcatalyst @
categoriescatalyst, perl
postedApr 24, '09 at 3:09p
activeApr 24, '09 at 3:09p

1 user in discussion

Joe higton: 1 post



site design / logo © 2023 Grokbase