http://qs1969.pair.com?node_id=302003

gregor-e has asked for the wisdom of the Perl Monks concerning the following question:

An easy one (I hope) - how does one process the parameters from an HTTP::Request they have received using HTTP::Daemon? I'm hoping there's a way to create a CGI object, initialized with the HTTP::Request, like:
use HTTP::Daemon; use CGI qw/:standard/; my $httpd = new HTTP::Daemon(LocalPort => 8765); while (my $connection = $httpd->accept()) { # spawn child to deal with this request fork() && next; while (my $request = $connection->get_request()) { ### I wish this would work. ### my $query = new CGI($request); ... process CGI parms in the usual way
Is there a way to feed an HTTP::Request object into CGI like that? Otherwise, how do people normally process HTTP::Requests?