|
NAMEHTTP::Request::AsCGI - Set up a CGI environment from an HTTP::Request VERSIONversion 1.2 SYNOPSIS use CGI;
use HTTP::Request;
use HTTP::Request::AsCGI;
my $request = HTTP::Request->new( GET => 'http://www.host.com/' );
my $stdout;
{
my $c = HTTP::Request::AsCGI->new($request)->setup;
my $q = CGI->new;
print $q->header,
$q->start_html('Hello World'),
$q->h1('Hello World'),
$q->end_html;
$stdout = $c->stdout;
# environment and descriptors will automatically be restored
# when $c is destructed.
}
while ( my $line = $stdout->getline ) {
print $line;
}
DESCRIPTIONProvides a convenient way of setting up an CGI environment from an HTTP::Request. METHODS
SEE ALSOTHANKS TOThomas L. Shinnick for his valuable win32 testing. AUTHORSChristian Hansen <ch@ngmedia.com> Hans Dieter Pearcey <hdp@cpan.org> COPYRIGHT AND LICENSEThis software is copyright (c) 2010 by Christian Hansen <ch@ngmedia.com>. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
|