httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rob Hartill <r...@imdb.com>
Subject ScriptAlias-like extensions for perl etc
Date Fri, 26 Apr 1996 14:04:27 GMT

All my CGI is written in perl. As an experiment I changed
mod_cgi.c to call the perl binary directly instead of leaving
it to sh (I think that's what gets called to determine that perl
needs to be called because of the "#!" first line.)

I guess there must be an existing directive that could be reused to
mark script extensions or entire directories to be passed to a binary
instead of to sh. The change to mod_cgi.c is trivial..

  execle(r->filename, argv0, NULL, env);
becomes
  execle("/usr/local/bin/perl", argv0, r->filename, NULL, env);


Speedups are not at all dramatic (running perl is a bigger overhead), but
I can detect speedup by hammering on a CGI script and then looking at
mod_status to compare the numbers.

What'd be nice would be things like,

CGIBinary /usr/local/bin/perl pl
DefaultBinary /usr/local/bin/perl

or something along those lines.


thoughts?

rob

Mime
View raw message