[Catalyst] Has $c->response->redirect behaviour changed?
Chisel Wright
chisel at herlpacker.co.uk
Wed Jan 25 12:42:57 CET 2006
On Wed, Jan 25, 2006 at 11:19:12AM +0000, Alex Kavanagh wrote:
> Indeed! In my mucking around with things I had left an 'end' sub hanging
> around in one of my controllers which was defeating DefaultEnd. Once
> I had removed it, it worked like a treat. All I can suggest is the
> debug from the standalone server which lists which actions were run
> through.
I'm combining my end() and DefaultEnd with next magic:
---- cut here ----
# updated to use information from:
# http://catalyst.perl.org/calendar/2005/8/
sub end : Private {
my ($self, $c) = @_;
# if we have any error(s) in the stash, automatically show the error
# page
if (defined $c->stash->{error}) {
$c->stash->{template} = 'error/simple';
}
# use DefaultEnd magic
$c->NEXT::end( $c );
# (re)populate the form
$c->fillform( $c->stash->{formdata} );
}
---- cut here ----
Apprently the best of both worlds ...
--
Chisel Wright
e: chisel at herlpacker.co.uk
w: http://www.herlpacker.co.uk/
This is not an automated signature. I type this in to the bottom of every
message.
More information about the Catalyst
mailing list