[Catalyst] Forward on to other actions after removing first path segment?

Eden Cardim edencardim at gmail.com
Mon Nov 15 16:58:47 GMT 2010

>>>>> "Dorian" == Dorian Taylor (Lists) <dorian.taylor.lists at gmail.com> writes:

    Dorian> I'm ambiguous on two things:

    Dorian> 1) I don't understand why an outside request to /foo will find its way to
    Dorian> /foo/index in MyApp::Foo but a forwarded request will not. I  understand I'm
    Dorian> supposed to use 'visit' or 'go' but they don't seem to  do
    Dorian> it either.

Internal action paths are one thing and URI's are another. Forwarding
and dispatching are two separate things. The dispatch process matches a
URI and happens once per request (unless you invoke ->go or
->visit). Forwarding is mostly a shortcut for passing the context on to
other subroutines.

    Dorian> 2) I'm not entirely sure about the 'right' way to get the rest of the
    Dorian> request-URI path. As a (.*) in the regex function attribute? Some  other way?

See Chained actions, as mentioned in Ben's previous post.

     Eden Cardim            Need help with your perl Catalyst or DBIx::Class project?
   Software Engineer                   http://www.shadowcat.co.uk/catalyst/
 Shadowcat Systems Ltd.        Want a managed development or deployment platform?
http://blog.edencardim.com             http://www.shadowcat.co.uk/servers/

More information about the Catalyst mailing list