perl - Match any GET path with Mojolicious::Lite -
I want to match any GET request in Mojolicious :: Lite. The code looks like this:
get '. * '= & Gt; Sub (my $ self = shift; $ self-> render (text = & gt; 'nothing to see here, go along.');}; MojoX :: Routes :: Pattern.pm dies at line 301 with "modification of non-compositionable array value." I tried other arguments for matching , such as qr // works for / , but does not match / foo . I also tried to peek at the source, but I'm not intelligent Am you?
I think you want:
get '/ (* restepath)' = & gt; ... ( restofpath is a name that will allow you to get the actual pathname later, you will need it ...) For more information, see the documentation.
Comments
Post a Comment