I'd write a webserver with POE in a different way with Filter::HTTPD. Perhaps the following code from POE Cookbook/Web Server might interest you:
#!/usr/bin/perl use warnings; use strict; use POE qw(Component::Server::TCP Filter::HTTPD); use HTTP::Response; # Spawn a web server on port 8088 of all interfaces. POE::Component::Server::TCP->new ( Alias => "web_server", Port => 8088, ClientFilter => 'POE::Filter::HTTPD', # The ClientInput function is called to deal with client input. # Because this server uses POE::Filter::HTTPD to parse input, # ClientInput will receive HTTP requests. ClientInput => sub { my ( $kernel, $heap, $request ) = @_[ KERNEL, HEAP, ARG0 ]; # Filter::HTTPD sometimes generates HTTP::Response objects. # They indicate (and contain the response for) errors that occ +ur # while parsing the client's HTTP request. It's easiest to se +nd # the responses as they are and finish up. if ( $request->isa("HTTP::Response") ) { $heap->{client}->put($request); $kernel->yield("shutdown"); return; } # The request is real and fully formed. Build content based o +n # it. Insert your favorite template module here, or write you +r # own. :) my $request_fields = ''; $request->headers()->scan ( sub { my ( $header, $value ) = @_; $request_fields .= "<tr><td>$header</td><td>$value</td +></tr>"; } ); my $response = HTTP::Response->new(200); $response->push_header( 'Content-type', 'text/html' ); $response->content ( "<html><head><title>Your Request</title></head>" . "<body>Details about your request:" . "<table border='1'>$request_fields</table>" . "</body></html>" ); # Once the content has been built, send it back to the client # and schedule a shutdown. $heap->{client}->put($response); $kernel->yield("shutdown"); } ); # Start POE. This will run the server until it exits. $poe_kernel->run(); exit 0;

Best regards,
perl -e "s>>*F>e=>y)\*martinF)stronat)=>print,print v8.8.8.32.11.32"


In reply to Re: Re: POE::Component::Server::HTTP: The _signal event is deprecated by strat
in thread 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":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.