Snippets

Brian Medley Attempt to work with a double slash

Created by Brian Medley
1
2
3
4
5
6
7
8
9
hook before_routes => sub {
    my $c = shift;

    if ("/foo//bar" eq $c->req->url->path) {
        $c->req->url->path("/foo/bar");
    }
};

get '/foo/bar' => sub { shift->render(text => "Hello world"); };

Comments (0)

HTTPS SSH

You can clone a snippet to your computer for local editing. Learn more.