Commit | Line | Data |
---|---|---|
c2f31789 | 1 | #!/usr/bin/perl |
2 | ||
3 | use Web::Simple 'HelloWorld'; | |
4 | ||
5 | { | |
6 | package HelloWorld; | |
7 | ||
64e6ba84 | 8 | sub dispatch_request { |
c2f31789 | 9 | sub (GET) { |
10 | [ 200, [ 'Content-type', 'text/plain' ], [ 'Hello world!' ] ] | |
11 | }, | |
12 | sub () { | |
13 | [ 405, [ 'Content-type', 'text/plain' ], [ 'Method not allowed' ] ] | |
14 | } | |
15 | }; | |
16 | } | |
17 | ||
18 | HelloWorld->run_if_script; |