Apache-Config-Preproc

 view release on metacpan or  search on metacpan

lib/Apache/Config/Preproc/ifmodule.pm  view on Meta::CPAN

    'mod_socache_dbm.c' => 'socache_dbm_module',
    'mod_socache_dc.c' => 'socache_dc_module',
    'mod_socache_memcache.c' => 'socache_memcache_module',
    'mod_socache_shmcb.c' => 'socache_shmcb_module',
    'mod_speling.c' => 'speling_module',
    'mod_ssl.c' => 'ssl_module',
    'mod_status.c' => 'status_module',
    'mod_substitute.c' => 'substitute_module',
    'mod_suexec.c' => 'suexec_module',
    'mod_unique_id.c' => 'unique_id_module',
    'mod_unixd.c' => 'unixd_module',
    'mod_userdir.c' => 'userdir_module',
    'mod_usertrack.c' => 'usertrack_module',
    'mod_version.c' => 'version_module',
    'mod_vhost_alias.c' => 'vhost_alias_module',
    'mod_watchdog.c' => 'watchdog_module',
    'mod_xml2enc.c' => 'xml2enc_module'
);

sub module_loaded {
    my ($self, $id) = @_;

lib/Apache/Config/Preproc/include.pm  view on Meta::CPAN

    }
    close $nullin;
    close $nullout;
}    

sub check_included {
    my ($self, $file) = @_;
    return $self->${ \ $self->{check_included} }($file);
}

# Default included file table for unix-like OSes
sub _check_included_stat {
    my ($self, $file) = @_;
    my ($dev,$ino) = stat($file) or return 0;
    return grep { $_->{dev} == $dev && $_->{ino} == $ino } @{$self->{context}};
}

# Path-based file table, for defective OSes (MSWin32)
sub _check_included_path {
    my ($self, $file) = @_;
    my $path = abs_path($file);

t/03ifmodule00.t  view on Meta::CPAN

plan test => 1;

use TestPreproc;

my $obj = new TestPreproc -expand => [qw(ifmodule)];
ok($obj->dump_raw, $obj->dump_expect);

__DATA__
!>httpd.conf
LoadModule mpm_prefork_module lib/httpd/modules/mod_mpm_prefork.so
LoadModule unixd_module lib/httpd/modules/mod_unixd.so

<IfModule !mpm_netware_module>
    PidFile "/var/run/httpd.pid"
</IfModule>
<IfModule mpm_prefork_module>
    StartServers          1
    MinSpareServers       1
    MaxSpareServers       1
    MaxClients           10
    MaxRequestsPerChild   0

t/03ifmodule00.t  view on Meta::CPAN

    MaxThreads            1000
    MaxRequestsPerChild      0
    MaxMemFree             100
</IfModule>
<IfModule mpm_mpmt_os2_module>
    StartServers           2
    MinSpareThreads        5
    MaxSpareThreads       10
    MaxRequestsPerChild    0
</IfModule>
<IfModule unixd_module>
    User apache
    Group apache
</IfModule>
<IfModule mpm_winnt_module>
    ThreadsPerChild      150
    MaxRequestsPerChild    0
</IfModule>
!=
LoadModule mpm_prefork_module lib/httpd/modules/mod_mpm_prefork.so
LoadModule unixd_module lib/httpd/modules/mod_unixd.so

    PidFile "/var/run/httpd.pid"
    StartServers          1
    MinSpareServers       1
    MaxSpareServers       1
    MaxClients           10
    MaxRequestsPerChild   0
    User apache
    Group apache
!$

t/06locus06.t  view on Meta::CPAN

plan test => 1;

use TestPreproc;

my $obj = new TestPreproc -expand => [qw(locus ifmodule)];
ok($obj->dump_reformat_synclines, $obj->dump_expect);

__DATA__
!>httpd.conf
LoadModule mpm_prefork_module lib/httpd/modules/mod_mpm_prefork.so
LoadModule unixd_module lib/httpd/modules/mod_unixd.so

<IfModule !mpm_netware_module>
    PidFile "/var/run/httpd.pid"
</IfModule>
<IfModule mpm_prefork_module>
    StartServers          1
    MinSpareServers       1
    MaxSpareServers       1
    MaxClients           10
    MaxRequestsPerChild   0

t/06locus06.t  view on Meta::CPAN

    MaxThreads            1000
    MaxRequestsPerChild      0
    MaxMemFree             100
</IfModule>
<IfModule mpm_mpmt_os2_module>
    StartServers           2
    MinSpareThreads        5
    MaxSpareThreads       10
    MaxRequestsPerChild    0
</IfModule>
<IfModule unixd_module>
    User apache
    Group apache
</IfModule>
<IfModule mpm_winnt_module>
    ThreadsPerChild      150
    MaxRequestsPerChild    0
</IfModule>
!=
# $server_root/httpd.conf:1
LoadModule mpm_prefork_module lib/httpd/modules/mod_mpm_prefork.so
# $server_root/httpd.conf:2
LoadModule unixd_module lib/httpd/modules/mod_unixd.so
# $server_root/httpd.conf:3

# $server_root/httpd.conf:5
PidFile "/var/run/httpd.pid"
# $server_root/httpd.conf:8
StartServers 1
# $server_root/httpd.conf:9
MinSpareServers 1
# $server_root/httpd.conf:10
MaxSpareServers 1

t/99all00.t  view on Meta::CPAN

    MaxThreads            1000
    MaxRequestsPerChild      0
    MaxMemFree             100
</IfModule>
<IfModule mpm_mpmt_os2_module>
    StartServers           2
    MinSpareThreads        5
    MaxSpareThreads       10
    MaxRequestsPerChild    0
</IfModule>
<IfModule unixd_module>
    User apache
    Group apache
</IfModule>
<IfModule mpm_winnt_module>
    ThreadsPerChild      150
    MaxRequestsPerChild    0
</IfModule>
!>log.conf
<IfModule log_config_module>
    LogFormat "%a" combined



( run in 0.714 second using v1.01-cache-2.11-cpan-39bf76dae61 )