On Sat, Mar 17, 2012 at 7:04 PM, Tomasz Konojacki <xenu@poczta.onet.pl> wrote:
Also, could someone confirm this problem? I want to know whether it is happening to just me.

Hi. I'm sorry to have this topic delayed for a week now.

Basically by "die()"ing, you're forcing the perl interpreter to close. You're providing a bad result to the web server by shutting off the app, and you're returning the exit code of die() to the user. In effect if you were to save the result to a file, you'll get a 500 error page. The reason you're not getting this in an actual proper html output and instead get it in x-www-form-urlencode, I believe is because you're crashing the app.

This is why "die()" should never be used in *any* web application (Dancer/Catalyst/CGI/etc.). You should instead use whatever the web application provides you with in order to halt the requests properly and return an error to the user.

You should look at Dancer's exception system, or return an html with the problem.
S.