true has asked for the wisdom of the Perl Monks concerning the following question:
I've installed the mod_perl.c module on an apache 1.3.6 rh6.2 box. I added the Location tag in my httpd.conf file. From the looks of eveything mod_perl is installed and in the game. My httpd.conf file has the following.
I duplicated the following script in order to test the mod_perl for speed.# If the perl module is installed, this will be enabled. <IfModule mod_perl.c> Alias /perl/ /home/httpd/perl/ <Location /perl> SetHandler perl-script PerlHandler Apache::Registry Options +ExecCGI </Location> </IfModule>
One copy of the script above went in my mod_perl folder (/home/httpd/perl/). It ran from a web browser. mod_perl ON#!/usr/bin/perl -w $|=1; use strict; use LWP::Simple; use Time::HiRes; print "Content-type:text/html\n\n"; print "\n\n<pre>"; print Time::HiRes::time()."\n"; my $cd;my $z; my $st = Time::HiRes::time(); for($z=0; $z < 10;$z++){ my $ast = Time::HiRes::time(); my $get = get "http://www.perl.to/index.cgi?a=".$z; my $aed = Time::HiRes::time(); print "$z(".($aed-$ast).")\n"; } print "$cd\n"; my $ed = Time::HiRes::time(); print "took=".($ed-$st)."</pre>";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: mod_perl installed but not faster
by ajt (Prior) on Oct 18, 2002 at 10:55 UTC | |
by true (Pilgrim) on Oct 18, 2002 at 11:10 UTC | |
by true (Pilgrim) on Oct 18, 2002 at 12:12 UTC | |
|
Re: mod_perl installed but not faster
by shotgunefx (Parson) on Oct 18, 2002 at 10:42 UTC | |
by true (Pilgrim) on Oct 18, 2002 at 11:00 UTC | |
by shotgunefx (Parson) on Oct 18, 2002 at 11:16 UTC | |
|
Re: mod_perl installed but not faster
by tomhukins (Curate) on Oct 18, 2002 at 10:49 UTC |