in reply to Re: mod_perl installation weirdo...
in thread mod_perl installation weirdo...
_writing_ scripts with mod_perl is fairly significantly different. You can write stuff using Apache::Registry, but that's really a stopgap measure.
mod_perl allows you to write handlers for requests to apache. "Normally", with a cgi script, the request comes in, apache looks at it and does all the various lookups to get the right file. It then says "Ah, this is a CGI request", and hands it to the CGI handler. This, in turn, reads in the file, executes the she-bang line, and your script runs just as if it had been run from the command line. Output is then handed back to Apache, which passes it to the browser, and the user sees the results.
mod_perl lets you write your own handlers for requests. This is vastly faster, since you don't have to load Perl (it's resident), and perl has already pre-interpreted what it can of the script. It does represent a difference in how you think of requests. Your variables aren't limited to one execution, for example.
mod_perl is cool. The various mod_perl sites tend to assume you know what's going on, so I highly recommend the Eagle book from O'Reilly.
(The above is my simplified and possibly wrong interpretation of how mod_perl and Apache work their magic)
|
|---|