Apache::Module - Interface to Apache C module structures
use Apache::Module ();
This module provides an interface to the list of apache modules configured with your httpd and their module * structures.
module *
This method returns a pointer the first module in Apache's internal list of modules.
Example: my $top_module = Apache::Module->top_module; print "Configured modules: \n"; for (my $modp = $top_module; $modp; $modp = $modp->next) { print $modp->name, "\n"; }
This method returns a pointer to the module structure if found, under otherwise.
Example: for (qw(proxy perl include cgi)) { if(my $modp = Apache::Module->find($_)) { print "$_ module is configured\n"; print "with enabled commands: \n"; for (my $cmd = $modp->cmds; $cmd; $cmd = $cmd->next) { print " ", $cmd->name, "\n"; } } else { print "$_ module is not configured\n"; } }
Returns a pointer to the module response handler table.
Example:
print "module ", $modp->name, " handles:\n"; for (my $hand = $modp->handlers; $hand; $hand = $hand->next) { print $hand->content_type, "\n"; }
There's more you can do with this module, I will document it later. For now, see Apache::ModuleDoc and Apache::ShowRequest for examples.
Doug MacEachern
Apache::ModuleDoc(3), Apache::ShowRequest(3), Apache(3), mod_perl(3).
To install Apache::Module, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Apache::Module
CPAN shell
perl -MCPAN -e shell install Apache::Module
For more information on module installation, please visit the detailed CPAN module installation guide.