The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Apache::Config::Preproc::macro - expand macro statements

SYNOPSIS

$x = new Apache::Config::Preproc '/path/to/httpd.conf',
            -expand => [ qw(macro) ];

$x = new Apache::Config::Preproc '/path/to/httpd.conf',
            -expand => [ { macro => [ keep => $listref ] } ];

DESCRIPTION

Processes Macro and Use statements (see mod_macro) in the Apache configuration parse tree.

Macro statements are removed. Each Use statement is replaced by the expansion of the macro named in its argument.

The constructor accepts the following arguments:

keep => $listref

List of macro names to exclude from expanding. Each <Macro> and Use statement with a name from $listref as its first argument will be retained in the parse tree.

As a syntactic sugar, $listref can also be a scalar value. This is convenient when a single macro name is to be retained.

SEE ALSO

Apache::Config::Preproc