[Dancer-users] prefix disallows trailing slashes?

Brian E. Lozier brian at massassi.com
Tue Mar 22 01:09:07 CET 2011


I had a bunch of stuff in one app and today I upgraded Dancer to
latest and made sure everything worked, then I split out the main
stuff "prefix undef;" into MyApp::Web::Root and then my "forums" stuff
into MyApp::Web::Forum with prefix '/forums';

When I did this, my routes under /forums (other than "/") don't allow
the trailing slashes anymore.  For example, I have a route:

any '/:name/new_topic/' => sub { ... };

But if I access /forums/some_name/new_topic/ I get Error 404.  If I
change it to /forums/some_name/new_topic (note missing trailing slash)
it works.  So it seems that having trailing slashes in routes works
under prefix undef; but doesn't work (properly) under other prefixes.

Thanks,
Brian


More information about the Dancer-users mailing list