Gert Burger wrote: > Hi > > I would like some ideas on how todo the following in cat. > > I am in the process of designing a webapp that will allow online > gamers(Specificly players in ZA) to interact for a select few games. > Ie. There will be sections which will be common to each game, just > slightly customized for the game. > > My problem is, how do I make sure my controllers know which game they > are currently working on, some of my ideas included: > -Using cookies to store the currently selected game. > -Using get/post params to send it each time a request is made. > -Using the game as part of the url, eg > http://bla/games/ageofempires3/gamebooking, this will complicate the > controller's methods a bit as each method will be a regex.
Have a look at the :ChildOf attribute in http://dev.catalyst.perl.org/browser/branches/Catalyst-ChildOf/lib/Catalyst/Manual/Intro.pod for a cleaner, non-regex way to implement this sort of URL that I've been working on. This should hopefully go back to trunk before 5.70 ships. -- Matt S Trout Offering custom development, consultancy and support Technical Director contracts for Catalyst, DBIx::Class and BAST. Contact Shadowcat Systems Ltd. mst (at) shadowcatsystems.co.uk for more information + Help us build a better perl ORM: http://dbix-class.shadowcatsystems.co.uk/ + _______________________________________________ List: [email protected] Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/[email protected]/ Dev site: http://dev.catalyst.perl.org/
