On 14-05-12 01:24 PM, Warren Young wrote:
Is there a way to match both requests with a single route?  That is, can
I ask Dancer to ignore trailing slashes?


        prefix '/foo' => sub {
                get qr#/?$# => sub {

Or, as a general rule:

 hook before => sub {
     my $url = request->uri;
     redirect $url if $url =~ s#(?<=.)/$##;

- "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".

That might 'ave more to do with a... more Frenchie type of pronunciation. It might 'ave been reported, from time to time, that I do tend to aspire my H's. ;-) I'll correct that and the rest. Thanks!

dancer-users mailing list

Reply via email to