Apache::Command - Perl API for accessing Apache module command information
use Apache::Module (); use Apache::Command (); my $module = Apache::Module::find_linked_module('mod_perl.c'); my $cmd = $module->cmds(); while ($cmd) { $cmd->args_how(); $cmd->errmsg(); $cmd->req_override(); $cmd = $cmd->next(); }
Each Apache module can define a list of configuration commands it offers. This interface gives access to information about these configuration commands. Each module contains a chained-list of Apache::Command objects, each representing a single directive.
Apache::Command
For example, PerlRequire is a command offered by mod_perl.
PerlRequire
Apache::Command provides the following functions and/or methods:
args_how
What the command expects as arguments
$obj->args_how();
$obj
Apache::Command object
The flag value representing the type of command (i.e. ITERATE/TAKE2)
errmsg
'usage' message for that command, in case of syntax errors
$obj->errmsg();
The error message
name
Name of this command
$name = $obj->name();
The command name
next
The next command in the chain of commands for this module
$ret = $cmd->next();
$cmd
$ret
req_override
What overrides need to be allowed to enable this command.
$obj->req_override
The bit mask representing the overrides this command is allowed in (i.e OR_ALL/ACCESS_CONF)
mod_perl 2.0 documentation.
mod_perl 2.0 and its core modules are copyrighted under The Apache Software License, Version 2.0.
The mod_perl development team and numerous contributors.
To install mod_perl, copy and paste the appropriate command in to your terminal.
cpanm
cpanm mod_perl
CPAN shell
perl -MCPAN -e shell install mod_perl
For more information on module installation, please visit the detailed CPAN module installation guide.