NAME
Apache::Command - Perl API for accessing Apache module command information
Synopsis
use Apache::Module ();
use Apache::Command ();
my $module = Apache::Module::find_linked_module('mod_perl.c');
for (my $cmd = $module->cmds; $cmd; $cmd = $cmd->next) {
$cmd->args_how();
$cmd->errmsg();
$cmd->name();
$cmd->req_override();
}
Description
Apache::Command
provides the Perl API for accessing Apache module command information
API
Apache::Command
provides the following functions and/or methods:
args_how
What the command expects as arguments:
$how = $cmd->args_how();
- obj:
$cmd
(Apache::Command object
) - ret:
$how
(Apache::Const :cmd_how constant
) -
The flag value representing the type of this command (i.e.
Apache::ITERATE
,Apache::TAKE2
). - since: 1.99_12
errmsg
Get usage message for that command, in case of syntax errors:
$error = $cmd->errmsg();
- obj:
$cmd
(Apache::Command object
) - ret:
$error
( string ) -
The error message
- since: 1.99_12
name
Get the name of this command:
$name = $cmd->name();
- obj:
$cmd
(Apache::Command object
) - ret:
$name
( string ) -
The command name
- since: 1.99_12
next
Get the next command in the chain of commands for this module:
$next = $cmd->next();
- obj:
$cmd
(Apache::Command object
) - ret:
$next
(Apache::Command object
) -
Returns the next command in the chain for this module,
undef
for the last command. - since: 1.99_12
req_override
What overrides need to be allowed to enable this command:
$override = $cmd->req_override
- obj:
$cmd
(Apache::Command object
) - ret:
$override
(Apache::Const :override constant
) -
The bit mask representing the overrides this command is allowed in (i.e
Apache::OR_ALL
/Apache::ACCESS_CONF
). - since: 1.99_12
For example:
use Apache::Const -compile => qw(:override);
$cmd->req_override() & Apache::OR_AUTHCFG;
$cmd->req_override() & Apache::OR_LIMIT;
See Also
Copyright
mod_perl 2.0 and its core modules are copyrighted under The Apache Software License, Version 2.0.