[Catalyst] stripping path parts and then redispatch?
Bill Moseley
moseley at hank.org
Sun Feb 22 22:44:15 GMT 2009
On Sun, Feb 22, 2009 at 03:28:48PM -0700, Larry Leszczynski wrote:
> I'd like to be able to capture and strip off the language, in e.g.
> MyApp::Controller::Root::auto(), and then either forward or redispatch
> to the existing controllers, but haven't been able to come up with a way
> of generating the forwarding path/args that consistently works for all
> action types. E.g., how do I know if I should dispatch to action
> "/foo/bar", or action "/foo" with argument "bar"?
I'm sure there's better approach, but I've simply overridden
prepare_path and then removed the prefix (e.g. the language) from the
path, set a flag, and then appended it on $req->base.
--
Bill Moseley
moseley at hank.org
Sent from my iMutt
More information about the Catalyst
mailing list