05 Jul 2016 12:40:08 UTC
- Distribution: Test-Instance-Apache
- Source (raw)
- Browse (raw)
- How to Contribute
- Repository (git clone)
- Issues (3)
- Testers (98 / 529 / 0)
- KwaliteeBus factor: 0
- 70.85% Coverage
- License: perl_5
- Activity24 month
- Download (14.13KB)
- MetaCPAN Explorer
- Subscribe to distribution
- This version
- Latest version++ed by:1 non-PAUSE userTBSLIVER Tom Bloorand 1 contributors
- Tom Bloor
- SEE ALSO
Test::Instance::Apache::Modules - Apache module management for T::I::A
use FindBin qw/ $Bin /; use Test::Instance::Apache::Modules; my $modules = Test::Instance::Apache::Modules->new( server_root => "$Bin/conf", modules => [ qw/ mpm_prefork authz_core mome / ], ); # get include paths for config my $paths = $modules->include_modules;
Test::Instance::Apache::Modules sets up the required modules for Apache according to an array of module names. This functions similarly to
a2enmodwhich comes as part of the Apache distribution, however is much more simplified to only do what is necessary for T::I::A.
The module creates a
mods-enabledfolder inside the "server_root" directory, and then copies the contents of
/etc/apache2/mods-availableinto the new
mods-availablefolder. Then, symlinks are created across to the
mods-enabledfolder, ready for Apache to include from the "include_modules" list.
These are the available attributes on Test::Instance::Apache::Modules
The arrayref of modules to symlink into
mods-enabledfolder. This is required. Note that any modules specified here will need to be installed on your local machine, and you will have to specify ALL modules required - there are no assumptions made for modules to include.
The root directory of the server config. This directory is where
mods-enableddirectories will be created. This attribute is required.
This creates the include paths for the
loadfiles as required by Apache.
These are the methods available on Test::Instance::Apache::Modules.
This function performs the main part of this module. This copies all the current mods from
mods-availabledirectory, and then symlinks all the required modules across to the
Utility function to create a new directory in the "server_root".
Tom Bloor <email@example.com>
Copyright 2016 Tom Bloor
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
Module Install Instructions
To install Test::Instance::Apache, copy and paste the appropriate command in to your terminal.
perl -MCPAN -e shell install Test::Instance::Apache
For more information on module installation, please visit the detailed CPAN module installation guide.