ls has asked for the wisdom of the Perl Monks concerning the following question:
I just try to change some code from HTTP::Daemon to POE with POE::Component::Server::HTTP and get the following warning:
I've searched the documentation comming with POE and the monastir as well as http://poe.perl.org/, but haven't yet found out how I can change this and what can I register as a signal with POE.The _signal event is deprecated. Please use sig() to register a signa +l handler at E:\work\projects\cws_poe\cws.pl line 12 POE::Kernel's run() method was never called.
Please, could you tell me what I have to do?
Best regards,
ls
The code of the Script is nearly exactly the code from perldoc POE::Component::Server::HTTP:
#! /usr/bin/perl use warnings; use strict; use POE; use POE::Component::Server::HTTP; use HTTP::Status; use vars qw($Port); $Port = 8889; my $httpd = POE::Component::Server::HTTP->new ( Port => $Port, ContentHandler => { '/' => \&MainHandler }, Headers => {Server => 'any server' }, ); POE::Kernel->call($httpd, "shutdown"); sub MainHandler { my ($request, $response) = @_; $response->code(RC_OK); $response->content("Hi, you fetched ". $request->uri); return RC_OK; } # MainHandler
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: POE::Component::Server::HTTP: The _signal event is deprecated
by Matts (Deacon) on Dec 15, 2002 at 16:18 UTC | |
by strat (Canon) on Dec 15, 2002 at 22:54 UTC | |
|
Re: POE::Component::Server::HTTP: The _signal event is deprecated
by dingus (Friar) on Dec 15, 2002 at 15:59 UTC | |
|
Re: POE::Component::Server::HTTP: The _signal event is deprecated
by pg (Canon) on Dec 15, 2002 at 16:31 UTC | |
by Matts (Deacon) on Dec 15, 2002 at 18:10 UTC | |
|
Re: POE::Component::Server::HTTP: The _signal event is deprecated
by ls (Scribe) on Dec 15, 2002 at 13:42 UTC | |
|
Re: POE::Component::Server::HTTP: The _signal event is deprecated
by rcaputo (Chaplain) on Dec 18, 2002 at 02:50 UTC |