[Dancer-users] send_error requiring return
Lee Carmichael
leecarmichael123 at gmail.com
Wed Dec 14 00:29:27 CET 2011
Hello,
After reading the documentation on the 'send_error' function
(https://metacpan.org/module/Dancer#send_error), I expected it to work
without needing a return:
i.e.
get '/route1' => sub {
send_error "route1 error";
return "value from route1";
};
but I found that i need to use a return with it, like:
get '/route2' => sub {
return send_error "route2 error";
return "value from route2";
};
Is this an error in documentation, my understanding of documentation
or a bug with the software (if so I'll open a bug with test case). I'm
using Dancer 1.3080 and I was able to replicate this in the dancer
test suite with a new test case.
Thanks,
Lee
More information about the Dancer-users
mailing list