Parent Directory | Revision Log
initial commit
1 | #use POE::Component::Server::HTTP; |
2 | use POE qw(Component::Server::HTTP); |
3 | use HTTP::Status; |
4 | |
5 | sub handler { |
6 | my ($request, $response) = @_; |
7 | $response->code(RC_OK); |
8 | $response->content("Hi, you fetched ". $request->uri); |
9 | return RC_OK; |
10 | } |
11 | |
12 | POE::Component::Server::HTTP->new( |
13 | Port => 8000, |
14 | ContentHandler => { '/' => \&handler }, |
15 | Headers => { Server => 'My Server' }, |
16 | ); |
17 | |
18 | |
19 | $poe_kernel->run(); |
MailToCvsAdmin">MailToCvsAdmin | ViewVC Help |
Powered by ViewVC 1.1.26 |