[Catalyst] $c->res->redirect and $c->detach

John Napiorkowski jjn1056 at yahoo.com
Tue Sep 19 01:10:03 CEST 2006


--- Bogdan Lucaciu <bogdan at wiz.ro> wrote:

> On Mon, 2006-09-18 at 15:44 -0700, John Napiorkowski
> wrote:
> > > >
> > > > Doing a $c->detach('/end') after the redirect
> was
> > > > suggested to me, although I find this can give
> an
> > > > error since my default end action looks for a
> > > template
> > > > which is this case doesn't exist.
> > > >
> 
> Using the DefaultEnd plugin or the RenderView action
> class will handle
> redirects for you.
> 
> Snip from thei source of
> Catalyst::Action::RenderView:
> 	return 1 if $c->response->status =~
> /^(?:204|3\d\d)$/;
> 
> more info:
>
http://search.cpan.org/~mramberg/Catalyst-Action-RenderView-0.04/lib/Catalyst/Action/RenderView.pm
> 
> You still have to do the detach , of course.

Okay, that worked fined.  Another reason to update all
my Root end actions to RenderView.

--john


> 
> 
> -- 
> Bogdan Lucaciu <bogdan at wiz.ro>
> 
> 
> _______________________________________________
> List: Catalyst at lists.rawmode.org
> Listinfo:
> http://lists.rawmode.org/mailman/listinfo/catalyst
> Searchable archive:
>
http://www.mail-archive.com/catalyst@lists.rawmode.org/
> Dev site: http://dev.catalyst.perl.org/
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 



More information about the Catalyst mailing list