Bug#788488: libdancer2-perl: Failure to get POST arguments with serializer JSON with version 0.152000

Shane Utt shaneutt at linux.com
Thu Jun 11 19:40:23 UTC 2015


Package: libdancer2-perl
Version: 0.152000+dfsg-1
Severity: important

Dear Maintainer,

While attending a class at YAPCNA 2015 where Sawyer was teaching Dancer2,
I found an issue with using "set serializer => 'JSON';" with Debian 8's
version of Dancer2 (0.152000).

This is the code I used in a file (app.pl):

`
use Dancer2;
set serializer => 'JSON';
post '/' => sub {
my $p = params; my $r = request;
use Data::Dumper; print Dumper $p; print Dumper $r;
{ key => 'value' };
};
__PACKAGE__->to_app;
`

I ran the server with `plackup app.pl`;

And this is the curl line I used to test:

`curl -X POST -d '{"name":"shane"}' localhost:5000/

I tested this code with the packaged version (0.152000), which I expected to
yield a dump of my name that I sent in, but this did not occur it showed as
empty instead.

I then used carton (apt-get install carton) to get a more recent Dancer2 to
test against, and then ran:

carton exec plackup app.pl

and upon re-running the curl line with version 0.162000, the issue was resolved.

-- System Information:
Debian Release: 8.1
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 3.16.0-4-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages libdancer2-perl depends on:
ii  libapp-cmd-perl               0.324-1
ii  libclass-load-perl            0.22-1
ii  libconfig-any-perl            0.24-1
ii  libfile-sharedir-perl         1.102-1
ii  libhash-merge-simple-perl     0.051-1
ii  libhttp-body-perl             1.19-1
ii  libhttp-date-perl             6.02-1
ii  libhttp-message-perl          6.06-1
ii  libjs-jquery                  1.7.2+dfsg-3.2
ii  libjson-perl                  2.61-1
ii  libmime-types-perl            2.09-3
ii  libmodule-runtime-perl        0.014-1
ii  libmoo-perl                   1.006001-1
ii  libmoox-types-mooselike-perl  0.27-1
ii  libplack-perl                 1.0033-1
ii  libreturn-multilevel-perl     0.04-1
ii  librole-tiny-perl             1.003004-1
ii  libsafe-isa-perl              1.000005-1
ii  libtemplate-perl              2.24-1.2+b1
ii  libtemplate-tiny-perl         1.12-1
ii  liburi-perl                   1.64-1
ii  libwww-perl                   6.08-1
ii  libyaml-perl                  1.13-1
ii  perl                          5.20.2-3+deb8u1

Versions of packages libdancer2-perl recommends:
ii  libclass-load-xs-perl         0.08-1+b1
ii  libcrypt-urandom-perl         0.34-1
ii  libjson-xs-perl               2.340-1+b2
ii  libmath-random-isaac-xs-perl  1.004-1+b1

libdancer2-perl suggests no packages.

-- no debconf information



More information about the pkg-perl-maintainers mailing list