[Dancer-users] send_error requiring return
Lee Carmichael
leecarmichael123 at gmail.com
Wed Dec 14 17:55:54 CET 2011
Hi ambs and dams,
Thanks for the info.
On Wed, Dec 14, 2011 at 5:35 AM, damien krotkine <dkrotkine at gmail.com> wrote:
> Lee Carmichael : This new behaviour is available only in 1,3090, not
> in 1.3080. So I guess you just need to upgrade :) Let me know if it's
> still buggy.
Upgrading is the key, I've found my test case works in 1.3090. It was
a bit odd since the existing test also worked with die after
send_error in 1.3080.
FYI, here is my updates to t/06_helpers/05_send_error.t:
<snip>
get '/error2' => sub {
send_error "FAIL";
return "something completely different";
};
response_status_is [GET => '/error'] => 500, "status is 500 on send_error";
response_content_like [GET => '/error'] => qr/FAIL/, "content of error is kept";
# test '/error2'
response_status_is [ GET => '/error2' ] => 500, "status is 500 on
send_error";
response_content_like [ GET => '/error2' ] => qr/FAIL/, "content of
error is kept even with return";
Take Care,
Lee
More information about the Dancer-users
mailing list