[Dancer-users] Invalid content-type sended by dancer when error 500 happens

Tomasz Konojacki xenu at poczta.onet.pl
Thu Mar 15 18:11:46 CET 2012


Oops, forget about "Exception::Class" part, code should look like this:

--begin--
# This is application generated by "dancer -a test", only 
test/lib/test.pm was modified
package test;
use Dancer ':syntax';

our $VERSION = '0.1';

get '/' => sub {
     <<EOF;
<!doctype html>
<html>
<head><title>test</title></head>
<body>
	<form action="/" method="post">
		<input type="text" name="login"><br>
		<input type="password" name="password"><br>
		<input type="submit" name="submit">
	</form>
</body>
EOF

};

post '/' => sub {
     die 'error!';
};

true;
--end--



More information about the Dancer-users mailing list