[dancer-users] Doc bug: params() return value
Warren Young
warren at etr-usa.com
Fri May 2 20:03:11 BST 2014
This page claims params() returns a hashref, always:
https://metacpan.org/pod/Dancer::Request#params
Not true. It only does so in scalar context. Thus:
myfunction(params);
will pass myfunction a hash which gets flattened to an array, not a
hashref. The fix is myfunction(scalar params);
Also, this link from that section:
https://metacpan.org/pod/Dancer::Request#params-source
is missing the "-source" bit at the end.
(The latter link does document this behavior of params(), but that
didn't stop me from banging my head against a wall for an hour or two
while I still believed what the first page said.)
More information about the dancer-users
mailing list