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:
- preloaded => LISTREF
- 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.
- probe => LISTREF | 1
- 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)]