gozer 2004/08/10 21:50:56 Modified: src/docs/2.0/api/Apache Command.pod Log: Fully reviewed and partially completed. There is also the issue of check_cmd_context and soak_end_container probably belonging in Apache::CmdParams Revision Changes Path 1.5 +34 -88 modperl-docs/src/docs/2.0/api/Apache/Command.pod Index: Command.pod =================================================================== RCS file: /home/cvs/modperl-docs/src/docs/2.0/api/Apache/Command.pod,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- Command.pod 10 Aug 2004 03:15:52 -0000 1.4 +++ Command.pod 11 Aug 2004 04:50:56 -0000 1.5 @@ -1,25 +1,31 @@ =head1 NAME -Apache::Command - Perl API for XXX +Apache::Command - Perl API for accessing Apache module command information =head1 Synopsis + use Apache::Module (); use Apache::Command (); - -META: to be completed - - - + 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(); + } =head1 Description -META: to be completed - - +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. +For example, C<PerlRequire> is a command offered by mod_perl. =head1 API @@ -27,44 +33,20 @@ -Comments for Philippe: - - should the elements of ap_command_t elements be writable? if not - set those to readonly, e.g to set func to read-only change - xs/maps/apache_structures.map and add '<' at the beginning of the - line: - - <command_rec> - name - < func - cmd_data - ... - </command_rec> - - in either case make sure to adjust the docs whether each method is - readonly or read/write. - - - - - - =head2 C<args_how> -META: Autogenerated - needs to be reviewed/completed - What the command expects as arguments - $obj->args_how($newval); + $obj->args_how(); =over 4 =item obj: C<$obj> ( C<L<Apache::Command object|docs::2.0::api::Apache::Command>> ) -=item arg1: C<$newval> (integer) +=item ret: ( integer ) -=item ret: no return value +The flag value representing the type of command (i.e. ITERATE/TAKE2) =item since: 1.99_12 @@ -76,7 +58,7 @@ =head2 C<check_cmd_context> -META: Autogenerated - needs to be reviewed/completed +META: This probably belongs in Apache::CmdParams $ret = $cmd->check_cmd_context($forbidden); @@ -93,33 +75,7 @@ =item ret: C<$ret> ( string ) -Error string on error, NULL on success - -=item since: 1.99_12 - -=back - - - - - -=head2 C<cmd_data> - -META: Autogenerated - needs to be reviewed/completed - -Extra data, for functions which implement multiple commands... - - $cmd_data = $obj->cmd_data(); - $prev_cmd_data = $obj->cmd_data($new_cmd_data); - -=over 4 - -=item obj: C<$obj> -( C<L<Apache::Command object|docs::2.0::api::Apache::Command>> ) - -=item opt arg1: C<$new_cmd_data> (XXX) - -=item ret: no return value +Error string on error, C<undef> on success =item since: 1.99_12 @@ -129,25 +85,20 @@ - - - =head2 C<errmsg> -META: Autogenerated - needs to be reviewed/completed - -'usage' message, in case of syntax errors +'usage' message for that command, in case of syntax errors - $obj->errmsg($newval); + $obj->errmsg(); =over 4 =item obj: C<$obj> ( C<L<Apache::Command object|docs::2.0::api::Apache::Command>> ) -=item arg1: C<$newval> ( string ) +=item ret: ( string ) -=item ret: no return value +The error message =item since: 1.99_12 @@ -161,21 +112,18 @@ =head2 C<name> -META: Autogenerated - needs to be reviewed/completed - Name of this command $name = $obj->name(); - $prev_name = $obj->name($new_name); =over 4 =item obj: C<$obj> ( C<L<Apache::Command object|docs::2.0::api::Apache::Command>> ) -=item opt arg1: C<$new_name> ( string ) +=item ret: ( string ) -=item ret: no return value +The command name =item since: 1.99_12 @@ -187,7 +135,7 @@ =head2 C<next> -META: Autogenerated - needs to be reviewed/completed +The next command in the chain of commands for this module $ret = $cmd->next(); @@ -212,20 +160,18 @@ =head2 C<req_override> -META: Autogenerated - needs to be reviewed/completed - What overrides need to be allowed to enable this command. - $obj->req_override($newval); + $obj->req_override =over 4 =item obj: C<$obj> ( C<L<Apache::Command object|docs::2.0::api::Apache::Command>> ) -=item arg1: C<$newval> (integer) +=item ret: ( integer ) -=item ret: no return value +The bit mask representing the overrides this command is allowed in (i.e OR_ALL/ACCESS_CONF) =item since: 1.99_12 @@ -237,10 +183,10 @@ =head2 C<soak_end_container> -META: Autogenerated - needs to be reviewed/completed +META: This probably belongs in Apache::CmdParams -Read all data between the current E<lt>fooE<gt> and the matching -E<lt>/fooE<gt>. All of this data is forgotten immediately. +Read all data between the current E<lt>CommandE<gt> and the matching +E<lt>/CommandE<gt>. All of this data is forgotten immediately. $ret = $cmd->soak_end_container($directive); @@ -257,7 +203,7 @@ =item ret: C<$ret> ( string ) -Error string on failure, NULL on success +Error string on failure, C<undef> on success =item since: 1.99_12
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]