[Dancer-users] dancer2's prototype is there, feedback needed

Alexis Sukrieh sukria at sukria.net
Sat Oct 8 11:54:16 CEST 2011

Hi Assaf,

Note, I've run this test against the last HEAD of the GitHub repo
(master branch)

2011/10/3 Assaf Gordon <gordon at cshl.edu>:
> ## Access the app with "POST" (and parameters) - FAILS - the request hangs, BEFORE even reaching my 'post' handler code.
> $ curl -X POST -d name=foobar http://localhost:3000/
> [ XXXX - Stuck - XXXX ]

I can't reproduce that. Here is what I did:

  $ dancer -a d2test5post
  $ sed -i '/^get/s/^get/post/' lib/d2test5post.pm

Then I've updated the configuration file to use "template_toolkit" and
change the engines config section to fit the dancer2 expectation:

  template: "template_toolkit"
        encoding:  'utf8'
        start_tag: '<%'
        end_tag:   '%>'

Then I ran the app:

$ perl -I/home/sukria/Devel/dancer2/lib bin/app.pl
core: binding app to main
core: binding app to d2test5post
core: [d2test5post] running 'post' with /, CODE(0xa30eb50)
core: [d2test5post] running 'true' with
core: [main] running 'dance' with
HTTP::Server::Simple::PSGI: You can connect to your server at

And then it worked pretty well:

$ curl -I http://0:3000/
HTTP/1.0 404 Not Found

$ curl -I -X POST http://0:3000/
HTTP/1.0 200 OK

More information about the Dancer-users mailing list