O'Reilly logo

Writing Apache Modules with Perl and C by Lincoln Stein, Doug MacEachern

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

B.2. Other Configuration Methods

As with everything having to do with Perl, there are many ways to build and install mod_perl. This section covers several of the alternatives.

B.2.1. Using the .makepl_args.mod_perl File

The various Makefile.PL options can be overwhelming, difficult to remember, and cumbersome to type. One way to save your preferences for posterity is to wrap the Makefile.PL command into a shell script.

Another way to save your preferences is to create a file named .makepl_args.mod_perl , located either in the current directory (.), the parent directory (..), or your home directory. When Makefile.PL runs, it scans these directories for the file, reads it in, and strips out blank lines and comments. Everything else is treated as a command line option. For example:

# File: .makepl_args.mod_perl # enable all phase callbacks, API modules and misc features EVERYTHING=1 #tell Makefile.PL where the Apache source tree is APACHE_SRC=/usr/local/apache/src #tell Makefile.PL to use the first source found, which will be the #path specified above by APACHE_SRC DO_HTTPD=1 #tell Makefile.PL to configure Apache using the apaci interface USE_APACI=1 #specify the --prefix to give Apache's configure script APACHE_PREFIX=/usr/local/apache #add mod_info, mod_status and mod_proxy ADD_MODULE=info,status,proxy #additional arguments to give Apache's configure script #arguments can be delimited by a comma and/or specified with multiple #APACI_ARGS lines APACI_ARGS=--enable-shared=mime,--enable-shared=alias ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required