Thread: PHP vs Perl
View Single Post
Old 05-21-2008, 04:33 PM  
ScriptWorkz
Confirmed User
 
Industry Role:
Join Date: Jul 2007
Location: Intraweb
Posts: 274
Quote:
Originally Posted by u-Bob View Post
You are probably referring to perl cgi. PHP has the same 'limp dick' problems if you use it via the traditional cgi way. If you want to compare apples with apples then you have to compare mod_perl with mod_php and perl cgi with php cgi. If you compare mod_perl with mod_php you'll not only notice that mod_perl is faster than mod_php, it's also a lot more powerful. Mod_perl lets you to directly use all of the apache API in perl. PHP (mod_php) only allows you to control the content (response) phase of the Apache server.

When you request a page from an Apache webserver, the request goes through several processing phases (authentication, logging,... the response phase). The response phase is what you work with when building a perl cgi script or a php script. It is the part of the process that generates the actual HTML page and returns it to the browser. Mod_perl gives you the ability to replace the default behaviors of any of these processing phases with your own phase handlers.
mod_perl also allows you to some nifty shit w/ apache configuration (pulling it from outside sources, etc..).

I wish i used perl more, i've forgotten alot about it i'm sure, it just seems like most people use php now. I don't think i've actually wrote any perl (other then maybe fixing someone elses script) in like 2 or 3 years :/

Last edited by ScriptWorkz; 05-21-2008 at 04:34 PM..
ScriptWorkz is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote