[Catalyst] Root.pm $c->detach() does not detach?

Luis Azevedo braceta at sapo.pt
Tue Apr 3 17:18:11 GMT 2007


Hi All,

In Root.pm, "auto" action I am trying to break the execution of chain of 
Actions.

To be more exact, whenever I detect I loose connection to a socket or cookie 
session, I want to redirect the user to a login action, not rendering the 
action the user is calling.

I know I can make a simple $c->res->redirect() but the problem is I need to 
show a message in the login page telling the reason for the "logout". Usually 
I am passing messages trough Stash. Redirecting to the Login page needs to 
pass message somehow (through GET or POST, therefore not so beautiful s).

I have tried to detach the /login action,  in "auto" action from Root.pm 
controller,  but it is not working and I don't know why. See the actions 
chain:
| /auto                                                          
|  -> /login/index                                           
| /about/index                                               
| /end                                                           

The user called the /about action.

Can I break the chain somehow in Root.pm, "auto" action?

Thanks in advance,

-- 
Luís Azevedo





More information about the Catalyst mailing list