From: Tomas Doran Date: Tue, 25 Oct 2011 21:12:35 +0000 (-0700) Subject: Explain the logic here, as it's crazy. But I think this works. X-Git-Tag: 5.90007~8^2 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=commitdiff_plain;h=5e25c01fccd73dd1868c8be4df35be45d65e480f Explain the logic here, as it's crazy. But I think this works. And I hope this explains, rather than confuses --- diff --git a/lib/Catalyst.pm b/lib/Catalyst.pm index 28ec0eb..7cd76d5 100644 --- a/lib/Catalyst.pm +++ b/lib/Catalyst.pm @@ -2023,6 +2023,13 @@ sub prepare { $c->response->status(400); $c->response->content_type('text/plain'); $c->response->body('Bad Request'); + # Note we call finalize and then die here, which escapes + # finalize being called in the enclosing block.. + # It in fact couldn't be called, as we don't return $c.. + # This is a mess - but I'm unsure you can fix this without + # breaking compat for people doing crazy things (we should set + # the 400 and just return the ctx here IMO, letting finalize get called + # above... $c->finalize; die $_; };