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?

Yup.

        prefix '/foo' => sub {
                get qr#/?$# => sub {
                        "tadah!";
                };
        };

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!


Joy,
`/anick
_______________________________________________
dancer-users mailing list
dancer-users@dancer.pm
http://lists.preshweb.co.uk/mailman/listinfo/dancer-users

Reply via email to