Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
Hello,

I just try to change some code from HTTP::Daemon to POE with POE::Component::Server::HTTP and get the following warning:

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.
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.

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

In reply to POE::Component::Server::HTTP: The _signal event is deprecated by ls

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (4)
As of 2024-04-24 02:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found