mod_perl logo perl icon
previous page: Apache2::CmdParms - Perl API for Apache command parameters objectpage up: mod_perl 2.0 APInext page: Apache2::Connection - Perl API for Apache connection object

Apache2::Command - Perl API for accessing Apache module command information






Writing Apache Modules with Perl and C

Writing Apache Modules with Perl and C

By Lincoln Stein, Doug MacEachern
Embedding Perl in HTML with Mason

Embedding Perl in HTML with Mason

By Dave Rolsky, Ken Williams
mod_perl2 User's Guide

mod_perl2 User's Guide

By Stas Bekman, Jim Brandt
Practical mod_perl

Practical mod_perl

By Stas Bekman, Eric Cholet
The mod_perl Developer's Cookbook

The mod_perl Developer's Cookbook

By Geoffrey Young, Paul Lindner, Randy Kobes
mod_perl Pocket Reference

mod_perl Pocket Reference

By Andrew Ford


Table of Contents

Synopsis

  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();
  }


TOP

Description

Apache2::Command provides the Perl API for accessing Apache module command information



TOP

API

Apache2::Command provides the following functions and/or methods:



TOP

args_how

What the command expects as arguments:

  $how = $cmd->args_how();


TOP

errmsg

Get usage message for that command, in case of syntax errors:

  $error = $cmd->errmsg();


TOP

name

Get the name of this command:

  $name = $cmd->name();


TOP

next

Get the next command in the chain of commands for this module:

  $next = $cmd->next();


TOP

req_override

What overrides need to be allowed to enable this command:

  $override = $cmd->req_override

For example:

  use Apache2::Const -compile => qw(:override);
  $cmd->req_override() & Apache2::Const::OR_AUTHCFG;
  $cmd->req_override() & Apache2::Const::OR_LIMIT;


TOP

See Also

mod_perl 2.0 documentation.



TOP

Copyright

mod_perl 2.0 and its core modules are copyrighted under The Apache Software License, Version 2.0.



TOP

Authors

The mod_perl development team and numerous contributors.






TOP
previous page: Apache2::CmdParms - Perl API for Apache command parameters objectpage up: mod_perl 2.0 APInext page: Apache2::Connection - Perl API for Apache connection object