hello-world.cgi works again
[catagits/Web-Simple.git] / examples / hello-world / hello-world.cgi
CommitLineData
c2f31789 1#!/usr/bin/perl
2
3use 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
18HelloWorld->run_if_script;