Subject: | Error from dispatcher while parsing prototype |
The documentation says that something like the following should work, but I get the error shown:
$ perl -MWeb::Simple -E 'sub dispatch_request { sub ((GET + /foo) | (POST + /foo)) { [200, ["Content-Type", "text/plain"], ["it works"]] } }; main->run_if_script' /foo
500 Internal Server Error
Content-Type: text/plain
Error parsing dispatch specification: No closing ) found for opening (
(GET+/foo)|(POST+/foo)
^ here
perl version 5.18.2.