LoadModule perl_module modules/mod_perl.so
PerlRequire "/etc/httpd/mod_perl-startup.pl"
Alias /perl/ "/var/www/cgi-bin/"
SetHandler perl-script
PerlResponseHandler ModPerl::Registry
PerlOptions +ParseHeaders
Options +ExecCGI
####
if ( ! $ENV{MOD_PERL}) { die "GATEWAY_INTERFACE not Perl!"; }
use lib qw(/usr/local/lib);
use ModPerl::Util (); #for CORE::GLOBAL::exit
use Apache2::RequestRec ();
use Apache2::RequestIO ();
use Apache2::RequestUtil ();
use Apache2::ServerRec ();
use Apache2::ServerUtil ();
use Apache2::Connection ();
use Apache2::Log ();
use APR::Table ();
use ModPerl::Registry ();
use Apache2::Const -compile => ':common';
use APR::Const -compile => ':common';
1;
####
#!/usr/bin/perl -W
use strict;
print "Content-type: text/html\n\n";
$|=1;
for (my $x=1; $x<=10; $x++) {
print($x);
sleep 1;
}
exit(0);