According to the folks who
survey such things, the Open Source Apache server is the most popular
Web server on the Internet. And Perl is the language of choice for
many scripts running on all those Apache servers. But
if you really want to get the most out of Perl and Apache, you need to embed Perl directly into your server using Apache’s mod_perl extension.
According to the folks who survey such things, the Open Source Apache server is the most popular Web server on the Internet. And Perl is the language of choice for many scripts running on all those Apache servers. But if you really want to get the most out of Perl and Apache, you need to embed Perl directly into your server using Apache’s mod_perl extension.
Much more than a fancy way to quickly invoke a CGI script, mod_perl essentially embeds a Perl interpreter with access to nearly the entire Apache API within your Web server. Since you’re no longer invoking an external Perl interpreter, mod_perl improves the performance of your Perl scripts, but it also lets you do much more than you could with regular CGI. When was the last time you found yourself in a CGI program wishing you had a convenient way of figuring out what MIME type a document was, or what filename a given URI translated to? Well, with mod_perl, you can call on Apache’s built-in routines to solve problems like these with some authority.
And there’s more. Perl code can step in at any of the operation’s phases: initializing a child immediately after reading the headers, translating the URI to a filename, parsing the headers, checking host-based access, checking user credentials, verifying a user against a certain resource, determining the MIME type, fixing up the headers prior to a response, delivering the content, logging the request, cleaning up afterwards, or shutting down…
Please log in to view this content.
Not Yet a Member?
Register with LinuxMagazine.com and get free access to the entire archive, including: