Apache::Config::Preproc::ifmodule - expand IfModule statements
$x = new Apache::Config::Preproc '/path/to/httpd.conf', -expand => [ qw(ifmodule) ]; $x = new Apache::Config::Preproc '/path/to/httpd.conf', -expand => [ { ifmodule => { probe => [ '/usr/sbin/httpd' ] } } ];
Expands the <IfModule> statements in the Apache configuration parse tree. If the statement's argument evaluates to true, it is replaced by the statements inside it. Otherwise, it is removed. Nested statements are allowed. The LoadModule statements are examined in order to evaluate the argument.
The following constructor arguments are understood:
Supplies a list of preloaded module names. You can use this argument to pass a list of modules linked statically in your version of httpd.
Provides an alternative way of handling statically linked Apache modules. If LISTREF is given, each its element is treated as the pathname of the Apache httpd binary. The first of them that is found is run with the -l option to list the statically linked modules, and its output is parsed.
The argument
probe => 1
is a shorthand for
probe => [qw(/usr/sbin/httpd /usr/sbin/apache2)]
To install Apache::Config::Preproc, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Apache::Config::Preproc
CPAN shell
perl -MCPAN -e shell install Apache::Config::Preproc
For more information on module installation, please visit the detailed CPAN module installation guide.