[Catalyst] setting/getting session data from within tests

Matt S Trout dbix-class at trout.me.uk
Tue Jun 6 00:37:25 CEST 2006


Daniel McBrearty wrote:
> I can see your point, I think - need to think about this. Thank you.
> 
> what happens to the catalyst routing though when you have uri :
> 
> http://www.example.net/fr/some_controller/some_action
> 
> instead of :
> 
> http://www.example.net/some_controller/some_action
> 
> An auto acton in the route to get the language out of the uri? and all
> actions have to match on a regex?
> or is there a simpler way?

Currently the "usual" way to do this is to override prepare_path to 
strip the language off the front, populate at bit of stash and stick the 
path part on the end of $c->req->base so $c->uri_for works correctly. As 
of 5.70 there'll be an easier way, but while I've got most of the code 
working for it the user-level docs aren't written yet so I'll keep an 
explanation to myself for now :)



More information about the Catalyst mailing list