Apache-Config-Preproc
view release on metacpan or search on metacpan
t/99all00.t view on Meta::CPAN
# -*- perl -*-
use lib qw(t lib);
use strict;
use Test;
plan test => 1;
use TestPreproc;
my $obj = new TestPreproc -expand => [qw(compact include ifmodule macro ifdefine)];
ok($obj->dump_raw, $obj->dump_expect);
__DATA__
!>httpd.conf
# Main file
ServerName localhost
ServerRoot "$server_root"
Include conf.d/*.conf
Include mpm.conf
Include log.conf
Include vhost.conf
Include def.conf
<IfDefine FOO>
Listen 8080
</IfDefine>
Timeout 300
!>conf.d/load.conf
# Load prefork mpm
LoadModule mpm_prefork_module lib/httpd/modules/mod_mpm_prefork.so
# Load logging modules
LoadModule log_config_module lib/httpd/modules/mod_log_config.so
LoadModule logio_module lib/httpd/modules/mod_logio.so
!>conf.d/vhost.conf
<Macro vhost $name $port $dir>
<VirtualHost *:$port>
# Comment
ServerName $name
DocumentRoot $dir
<Directory $dir>
Require all granted
</Directory>
</VirtualHost>
</Macro>
!>def.conf
Define FOO
!>mpm.conf
<IfModule !mpm_netware_module>
PidFile "/var/run/httpd.pid"
</IfModule>
<IfModule mpm_prefork_module>
StartServers 1
MinSpareServers 1
MaxSpareServers 1
MaxClients 10
MaxRequestsPerChild 0
</IfModule>
<IfModule mpm_worker_module>
StartServers 2
MaxClients 150
MinSpareThreads 25
( run in 0.625 second using v1.01-cache-2.11-cpan-39bf76dae61 )