Coding with and for mod_perl
This chapter covers the mod_perl coding specifics, different from normal Perl coding.
In the following sections we discuss the specifics of Perl behavior under mod_perl.
In the normal Perl code exit() is used to stop the program flow and exit the Perl interpreter. However under mod_perl we only want the stop the program flow without killing the Perl interpreter.
You should take no action if your code includes exit() calls and it's OK to continue using them. mod_perl worries to override the exit() function with its own version which stops the program flow, and performs all the necessary cleanups, but doesn't kill the server. This is done by overriding:
*CORE::GLOBAL::exit = \&ModPerl::Util::exit;
so if you mess up with *CORE::GLOBAL::exit yourself you better know what you are doing.
*CORE::GLOBAL::exit
You can still call CORE::exit to kill the interpreter, again if you know what you are doing.
CORE::exit
Maintainer is the person(s) you should contact with updates, corrections and patches.
Only the major authors are listed above. For contributors see the Changes file.
To install mod_perl, copy and paste the appropriate command in to your terminal.
cpanm
cpanm mod_perl
CPAN shell
perl -MCPAN -e shell install mod_perl
For more information on module installation, please visit the detailed CPAN module installation guide.