I think the documentation is misleading here. Only elements of the path can be matched this way, with / as delimiter. So you will need:
get '/login/:username/:password' => sub { ...
But you should consider that such a GET request will need Javascript for logging in to the site, where a normal form submission will not need Javascript.
In reply to Re^3: Dancer2 Parameter Matching Failed
by Corion
in thread Dancer2 Parameter Matching Failed
by akuk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |