[Catalyst] Mapping urls inside catalyst
Mark Zealey
mark at itsolve.co.uk
Sat May 19 18:53:44 GMT 2007
Hi,
I'm trying to work out the 'best way' of solving the following problem.
Basically, I want to have several entries into my application. One is of the
form /foo/<id> where id is an integer primary key. Another
is /bar/<other_key> where other_key is some string key, and another is via a
virtual host. I want them all to go into my MyApp::C::Foo:: namespace, but I
have multiple classes under there eg MyApp::C::Foo::Fred. I thus want the
following to be equivalent:
mysite.com/foo/5/fred/list
mysite.com/bar/myname/fred/list
othersite.com/fred/list
(each of those should set some $c->stash variable to be the entry in the
database corrosponding to these bits of information).
I was thinking I colud do this using Chained actions; but I don't know much
about them and the rest of the app is not using them - it's using :Local for
the most part.
Thoughts, suggestions, ideas, criticisms welcome!
Mark
More information about the Catalyst
mailing list