libapa...ommand(3pm)
π NAME π
okay so bestie, Apache2::Command is the Perl API that lets you peek at Apache module command information. that's the whole vibe. it's giving backstage pass to the mod_perl world π
this page lives in the User Contributed Perl Documentation section of the manual, and yes it's a libapa...ommand(3pm) situation. iykyk π
β¨ Synopsis β¨
here's the lil taste test bestie, copy it exactly:
use Apache2::Module ();
use Apache2::Command ();
my $module = Apache2::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();
}
see how it justβ¦ walks the command chain like a little conga line π¦ grab the module, loop through cmds, hop to next, and ask each command the juicy questions.
πΈ Description πΈ
Apache2::Command provides the Perl API for accessing Apache module command information. that's it, that's the whole job description. it's the little lens you look through when you wanna know what a module's commands are up to πβ¨
π API π
Apache2::Command provides the following functions and/or methods (no cap, this is the full list):
π
args_how
what the command expects as arguments:
$how = $cmd->args_how();
- obj:
$cmd( anApache2::Command object) - ret:
$how( anApache2::Const :cmd_how constant) β the flag value representing the type of this command, i.e.Apache2::Const::ITERATE,Apache2::Const::TAKE2. - since:
2.0.00
π errmsg
get the usage message for that command, for when somebody typed something cursed and the syntax is broken:
$error = $cmd->errmsg();
- obj:
$cmd( anApache2::Command object) - ret:
$error( string ) β the error message - since:
2.0.00
π name
get the name of this command:
$name = $cmd->name();
- obj:
$cmd( anApache2::Command object) - ret:
$name( string ) β the command name - since:
2.0.00
π¦ next
get the next command in the chain of commands for this module. it's a linked list bestie, we love a chain:
$next = $cmd->next();
- obj:
$cmd( anApache2::Command object) - ret:
$next( anApache2::Command object) β returns the next command in the chain for this module, andundeffor the last command. - since:
2.0.00
π₯ req_override
what overrides need to be allowed to enable this command:
$override = $cmd->req_override
- obj:
$cmd( anApache2::Command object) - ret:
$override( anApache2::Const :override constant) β the bit mask representing the overrides this command is allowed in, i.e.Apache2::Const::OR_ALL/Apache2::Const::ACCESS_CONF. - since:
2.0.00
for example:
use Apache2::Const -compile => qw(:override);
$cmd->req_override() & Apache2::Const::OR_AUTHCFG;
$cmd->req_override() & Apache2::Const::OR_LIMIT;
bit-masking your way through overrides, main character energy fr fr π
π See Also π
- mod_perl 2.0 documentation.
β Copyright β
mod_perl 2.0 and its core modules are copyrighted under The Apache Software License, Version 2.0.
π«Ά Authors π«Ά
the mod_perl development team and numerous contributors. iconic behavior honestly π
and that's the whole page bestie, you ate it π
perl v5.42.3 Β· 2026-08-20 β mwah, go write something slay πβ¨
π¦ where this page comes from
- ubuntu stonking: libapache2-mod-perl2 2.0.13-2build3 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms