From: Kieren Diment Date: Wed, 20 Aug 2008 18:25:20 +0000 (+0000) Subject: improvements to redirect doc X-Git-Tag: 5.7099_04~26 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=commitdiff_plain;h=2d07aec5bb54b9e39dc4efd334f2455e66a33c83 improvements to redirect doc --- diff --git a/lib/Catalyst/Response.pm b/lib/Catalyst/Response.pm index 53d8ad8..0107be0 100644 --- a/lib/Catalyst/Response.pm +++ b/lib/Catalyst/Response.pm @@ -112,6 +112,11 @@ C<302>. $c->response->redirect( 'http://slashdot.org' ); $c->response->redirect( 'http://slashdot.org', 307 ); +This is a convenience method that sets the Location header to the +redirect destination, and then sets the response status. You will +want to C< return; > or C< $c->detach() > to interrupt the normal +processing flow if you want the redirect to occur straight away. + =cut sub redirect {