[Catalyst-dev] RFC: DWIM redirects

Ash Berlin ash_cpan at firemirror.com
Sat Jan 6 20:56:01 GMT 2007


Robert 'phaylon' Sedlacek wrote:
> Jonathan Rockway said:
>> During a recent IRC conversation, the idea came up to implement a
>> $c->redirect
>> method that works like $c->forward.  It will accept an application path
>> ('/controller/action', etc.) and will immediately halt processing (like
>> $c->detach('action')) but will issue an HTTP redirect to the uri_for the
>> action.
> 
> Sounds great, I'm just worried users will confuse $c->req->redirect and
> $c->redirect. Although, I'm rather worried they'll get confused while
> trying to get help in #catalyst :) How about 'redirect_to'?
> 'external_forward' sounds a bit goofy.
> 

$c->redirect is new and more DWIM - most ppl have issues with 
$c->res->redirect not detaching. I'd expect that this would help more 
than cause problems (If you already know about $c->res->redirect then 
there is also no problem).

-a



More information about the Catalyst-dev mailing list