Actually I am. Check out MainHandler() which is the content handler. The $response->content() will return to the web client the data specified. In this case, I'm calling the sub get_content().
sub MainHandler {
my ($request, $response) = @_;
$response->code(RC_OK);
$response->content( get_content($request) );
return RC_OK;
}
The handler is declared in create_httpd() which I didn't include in the OP :
sub create_httpd {
my ($kernel, $heap, $Port) = @_[KERNEL, HEAP, ARG0];
$kernel->alias_set('httpd_parent');
my $httpd = POE::Component::Server::HTTP->new (
Port => $Port, ContentHandler => { '/' => \&MainHandler } );
$heap->{httpd} = $httpd;
}
Jason L. Froebe
Team Sybase member No one has seen what you have seen, and until that happens, we're all going to think that you're nuts. - Jack O'Neil, Stargate SG-1
|