[dancer-users] Dancer1 v1.3124 on its way to CPAN

Warren Young warren at etr-usa.com
Mon May 12 18:24:10 BST 2014

On 5/10/2014 10:23, Yanick Champoux wrote:
> A new release of Dancer1 has been cut, and is on its merry way to CPAN.


>          prefix "/foo" => {
>              get ''  => { ... }; # matches '/foo'!
>              get '/' => { ... }; # matches '/foo/'

Is there a way to match both requests with a single route?  That is, can 
I ask Dancer to ignore trailing slashes?

Dancer's sensitivity to this makes it behave differently than Apache 
serving static content, where /foo and /foo/ do the same thing.

>      * Fix doc for params(). (GH#1025, reported by Warren Young)

Thank you!

The fixes are functionally correct, though if you will accept an inline 
patch, the English needs a bit of work.  I propose that you leave the 
first two sentences and the last alone, and put this between:

"...In list context, it returns a list of key => value pairs for all 
defined parameters. In scalar context, it returns a hash reference 


- "an hash" is incorrect American English (http://goo.gl/LNLLs7) at 
least.  I doubt it's correct for Commonwealth English as well, since I 
don't believe they pronounce "hash" the same as "ash".

- Moved the parentheticals inline

- Changed the return type in list context to list, since that's less 
confusing.  You can assign the return value to a hash or a list.

More information about the dancer-users mailing list