[Catalyst] Mapping urls inside catalyst

Dave Gray yargevad at gmail.com
Tue May 22 04:14:47 GMT 2007


Hi Robert,

On 5/19/07, Robert 'phaylon' Sedlacek <rs at 474.at> wrote:
> Mark Zealey wrote:
> > I thus want the following to be equivalent:
> >
> > mysite.com/foo/5/fred/list
> > mysite.com/bar/myname/fred/list
> > othersite.com/fred/list
[snip]
> This is all untested of course. But you should get the chains
>
>   /foo/*/*/list - Foo::base, Foo::load, Fred::load_fred, Fred::list_fred
>   /bar/*/*/list - Bar::base, Bar::load, Fred::load_fred, Fred::list_fred
>   /*/*/list     - ViaHost::base, ViaHost::load, Fred::load_fred,
>                   Fred::list_fred

What do you gain by doing it this way instead of using mod_rewrite or
similar? Obviously mod_rewrite isn't as flexible in that you need to
update your ruleset separately instead of only changing your
application level code, but that seems like an acceptable tradeoff to
me.

Dave



More information about the Catalyst mailing list