[Catalyst] Can't seem to use forward or detach. Any special requirements?

kakimoto at tpg.com.au kakimoto at tpg.com.au
Mon Apr 27 12:07:41 GMT 2009


Hi, everyone,
I know that most people here would understand redirect, forward and
detach well.
Unfortunately, there are people like myself who don't understand it that
well and hence, after looking at the CPAN catalyst docs and J.Rockway's
book, still fail to find a page that defines these methods and
differentiates them clearly.

 i hope someone can help shed some light here. Here it goes:

Looking at the doc for Catalyst::Response->redirect (
http://search.cpan.org/~flora/Catalyst-Runtime-5.80002/lib/Catalyst/Response.pm#$res-%3Eredirect(_$url,_$status_)
 ),

can anyone tell me

- do the request parameters still stay when redirected?
- how about the stash values? do they persist after the redirection? I
do not think so but it's good to have some confirmation.
- "This is a convenience method that sets the Location header to the
redirect destination, and then sets the response status. You will want
to  return;  or  $c-detach() > to interrupt the normal processing flow
if you want the redirect to occur straight away"  - Could anyone please
give some examples of this?

 do we do something like:

$c->res->redirect ($c->uri_for('subscriptions/confimation'));
return 0;

or something?



thanks!

k. akimoto



More information about the Catalyst mailing list