cvs commit: modperl-docs/src/docs/2.0/api/Apache Directive.pod
gozer 2004/09/13 11:42:55 Modified:src/docs/2.0/api/Apache Directive.pod Log: Small improvements on the documentation Revision ChangesPath 1.8 +12 -9 modperl-docs/src/docs/2.0/api/Apache/Directive.pod Index: Directive.pod === RCS file: /home/cvs/modperl-docs/src/docs/2.0/api/Apache/Directive.pod,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- Directive.pod 10 Aug 2004 23:02:01 - 1.7 +++ Directive.pod 13 Sep 2004 18:42:55 - 1.8 @@ -1,6 +1,6 @@ =head1 NAME -Apache::Directive - Perl API for manipulating Apache configuration tree +Apache::Directive - Perl API for manipulating the Apache configuration tree @@ -24,6 +24,11 @@ print $node->as_string; #do something with $node + + my $directive = $node->directive; + my $args = $node->args; + my $filename = $node->filename; + my $line_num = $node->line_num; if (my $kid = $node->first_child) { $node = $kid; @@ -47,14 +52,8 @@ =head1 Description -C allows its users to search and navigate the -internal Apache configuration. - -Internally, this information is stored in a tree structure. Each node -in the tree has a reference to its parent (if it's not the root), its -first child (if any), and to its next sibling. - -B +C provides the Perl API for manipulating the Apache +configuration tree @@ -256,7 +255,11 @@ =item arg1: C<$directive> ( string ) +The name of the directive to search for + =item opt arg2: C ( string ) + +Optional args to the directive to filter for =item ret: C<$string> ( string / ARRAY of HASHES ) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: modperl-docs/src/docs/2.0/api/Apache Command.pod
gozer 2004/09/13 12:01:53 Modified:src/docs/2.0/api/Apache Command.pod Log: Small improvements on the documentation Revision ChangesPath 1.9 +19 -17modperl-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.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- Command.pod 18 Aug 2004 06:34:58 - 1.8 +++ Command.pod 13 Sep 2004 19:01:53 - 1.9 @@ -15,6 +15,7 @@ while ($cmd) { $cmd->args_how(); $cmd->errmsg(); +$cmd->name(); $cmd->req_override(); $cmd = $cmd->next(); } @@ -26,12 +27,8 @@ =head1 Description -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 -C objects, each representing a single directive. - -For example, C is a command offered by mod_perl. +C provides the Perl API for accessing Apache module +command information @@ -51,16 +48,17 @@ What the command expects as arguments - $obj->args_how(); + $how = $obj->args_how(); =over 4 =item obj: C<$obj> ( C> ) -=item ret: ( integer ) +=item ret: C<$how> ( C> ) -The flag value representing the type of command (i.e. ITERATE/TAKE2) +The flag value representing the type of this command (i.e. ITERATE/TAKE2) =item since: 1.99_12 @@ -74,14 +72,14 @@ 'usage' message for that command, in case of syntax errors - $obj->errmsg(); + $error = $obj->errmsg(); =over 4 =item obj: C<$obj> ( C> ) -=item ret: ( string ) +=item ret: C<$error> ( string ) The error message @@ -99,14 +97,14 @@ Name of this command - $name = $obj->name(); + $name = $obj->name(); =over 4 =item obj: C<$obj> ( C> ) -=item ret: ( string ) +=item ret: C<$name> ( string ) The command name @@ -122,16 +120,19 @@ The next command in the chain of commands for this module - $ret = $cmd->next(); + $next = $cmd->next(); =over 4 =item obj: C<$cmd> ( C> ) -=item ret: C<$ret> +=item ret: C<$next> ( C> ) +Returns the next command in the chain for this module, undef for +the last command. + =item since: 1.99_12 =back @@ -147,14 +148,15 @@ What overrides need to be allowed to enable this command. - $obj->req_override + $override = $obj->req_override =over 4 =item obj: C<$obj> ( C> ) -=item ret: ( integer ) +=item ret: C<$override> ( C> ) The bit mask representing the overrides this command is allowed in (i.e OR_ALL/ACCESS_CONF) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: modperl-docs/src/docs/2.0/api/Apache Command.pod
gozer 2004/09/13 12:09:50 Modified:src/docs/2.0/api/Apache Command.pod Log: fix little markup for undef Revision ChangesPath 1.10 +1 -1 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.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- Command.pod 13 Sep 2004 19:01:53 - 1.9 +++ Command.pod 13 Sep 2004 19:09:50 - 1.10 @@ -130,7 +130,7 @@ =item ret: C<$next> ( C> ) -Returns the next command in the chain for this module, undef for +Returns the next command in the chain for this module, C for the last command. =item since: 1.99_12 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: modperl-docs/src/docs/2.0/api/Apache CmdParms.pod
stas2004/09/13 13:43:33 Modified:src/docs/2.0/api/Apache CmdParms.pod Log: fix order Revision ChangesPath 1.11 +30 -29modperl-docs/src/docs/2.0/api/Apache/CmdParms.pod Index: CmdParms.pod === RCS file: /home/cvs/modperl-docs/src/docs/2.0/api/Apache/CmdParms.pod,v retrieving revision 1.10 retrieving revision 1.11 diff -u -u -r1.10 -r1.11 --- CmdParms.pod 9 Sep 2004 22:39:13 - 1.10 +++ CmdParms.pod 13 Sep 2004 20:43:33 - 1.11 @@ -12,38 +12,38 @@ sub MyDirective { my($self, $parms, $args) = @_; - + # push config $parms->add_config(['ServerTokens off']); - + # this command's command object $cmd = $parms->cmd; - + # check the current command's context $error = $parms->check_cmd_context(Apache::NOT_IN_LOCATION); - + # this command's context $context = $parms->context; - + # this command's directive object $directive = $parms->directive; - + # the extra information passed thru cmd_data in # @APACHE_MODULE_COMMANDS $info = $parms->info; - + # which methods are ed ? $is_limited = $parms->method_is_limited('GET'); - + # which allow-override bits are set $override = $parms->override; - + # the path this command is being invoked in $path = $parms->path; - + # this command's pool $p = $parms->pool; - + # this command's configuration time pool $p = $parms->temp_pool; } @@ -94,24 +94,6 @@ Cadd_config|docs::2.0::api::Apache::ServerUtil/C_add_config_>>, Cadd_config|docs::2.0::api::Apache::RequestUtil/C_add_config_>> -=head2 C - -This module's command information - - $cmd = $parms->cmd(); - -=over 4 - -=item obj: C<$parms> -( C> ) - -=item ret: C<$cmd> -( C> ) - -=item since: 1.99_17 - -=back - @@ -151,6 +133,25 @@ } + + +=head2 C + +This module's command information + + $cmd = $parms->cmd(); + +=over 4 + +=item obj: C<$parms> +( C> ) + +=item ret: C<$cmd> +( C> ) + +=item since: 1.99_17 + +=back - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: modperl-docs/src/docs/2.0/api/Apache CmdParms.pod
stas2004/09/13 14:02:00 Modified:src/docs/2.0/api/Apache CmdParms.pod Log: minor tweaks Revision ChangesPath 1.12 +12 -8 modperl-docs/src/docs/2.0/api/Apache/CmdParms.pod Index: CmdParms.pod === RCS file: /home/cvs/modperl-docs/src/docs/2.0/api/Apache/CmdParms.pod,v retrieving revision 1.11 retrieving revision 1.12 diff -u -u -r1.11 -r1.12 --- CmdParms.pod 13 Sep 2004 20:43:33 - 1.11 +++ CmdParms.pod 13 Sep 2004 21:02:00 - 1.12 @@ -125,7 +125,7 @@ =back For example here is how to check whether a command is allowed in the -ELocationE container: +CLocationE> container: use Apache::Const -compile qw(NOT_IN_LOCATION); if (my $error = $parms->check_cmd_context(Apache::NOT_IN_LOCATION)) { @@ -169,7 +169,7 @@ =item obj: C<$parms> ( C> ) -=item ret: C<$newval> +=item ret: C<$directive> ( C> ) The current directive node in the configuration tree @@ -185,8 +185,8 @@ =head2 C -The extra information passed thru C in -C> +The extra information passed through C in +C>. $info = $parms->info; @@ -229,8 +229,8 @@ =back -For example, to check if the C method is being ELimitEed -in the current scope, do: +For example, to check if the C method is being +CLimitE>ed in the current scope, do: if ($parms->method_is_limited('GET') { die "..."; @@ -290,7 +290,7 @@ =item obj: C<$parms> ( C> ) -=item ret: C<$path> ( string / undef ) +=item ret: C<$path> ( string / C ) If configuring for a block like ELocationE, ELocationMatchE, EDirectoryE, etc., the pathname part @@ -300,9 +300,13 @@ =back +For example for a container definition: + + ... + - +I<'/foo'> will be returned. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: modperl-docs/src/docs/2.0/api/Apache CmdParms.pod
stas2004/09/13 14:07:10 Modified:src/docs/2.0/api/Apache CmdParms.pod Log: better call temp pool, temp_pool :) Revision ChangesPath 1.13 +7 -3 modperl-docs/src/docs/2.0/api/Apache/CmdParms.pod Index: CmdParms.pod === RCS file: /home/cvs/modperl-docs/src/docs/2.0/api/Apache/CmdParms.pod,v retrieving revision 1.12 retrieving revision 1.13 diff -u -u -r1.12 -r1.13 --- CmdParms.pod 13 Sep 2004 21:02:00 - 1.12 +++ CmdParms.pod 13 Sep 2004 21:07:09 - 1.13 @@ -300,7 +300,7 @@ =back -For example for a container definition: +For example for a container block: ... @@ -310,6 +310,10 @@ + + + + =head2 C Pool associated with this command @@ -361,14 +365,14 @@ Pool for scratch memory; persists during configuration, but destroyed before the first request is served. - $p = $parms->temp_pool; + $temp_pool = $parms->temp_pool; =over 4 =item obj: C<$parms> ( C> ) -=item ret: C<$p> +=item ret: C<$temp_pool> ( C> ) =item since: 1.99_12 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: modperl-docs/src/docs/2.0/api/Apache CmdParms.pod
gozer 2004/09/13 14:18:56 Modified:src/docs/2.0/api/Apache CmdParms.pod Log: add a sample @APACHE_MODULE_COMMANDS to better illustrate info Revision ChangesPath 1.14 +7 -0 modperl-docs/src/docs/2.0/api/Apache/CmdParms.pod Index: CmdParms.pod === RCS file: /home/cvs/modperl-docs/src/docs/2.0/api/Apache/CmdParms.pod,v retrieving revision 1.13 retrieving revision 1.14 diff -u -r1.13 -r1.14 --- CmdParms.pod 13 Sep 2004 21:07:09 - 1.13 +++ CmdParms.pod 13 Sep 2004 21:18:56 - 1.14 @@ -10,6 +10,13 @@ use Apache::CmdParms (); use Apache::Const -compile => qw(NOT_IN_LOCATION); + our @APACHE_MODULE_COMMANDS = ( +{ + name => 'MyDirective', + cmd_data => 'some extra data', +}, + ); + sub MyDirective { my($self, $parms, $args) = @_; - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: modperl-docs/src/docs/2.0/api/Apache CmdParms.pod
gozer 2004/09/13 14:38:23 Modified:src/docs/2.0/api/Apache CmdParms.pod Log: Add an example usage of $parms->info Revision ChangesPath 1.15 +22 -0 modperl-docs/src/docs/2.0/api/Apache/CmdParms.pod Index: CmdParms.pod === RCS file: /home/cvs/modperl-docs/src/docs/2.0/api/Apache/CmdParms.pod,v retrieving revision 1.14 retrieving revision 1.15 diff -u -r1.14 -r1.15 --- CmdParms.pod 13 Sep 2004 21:18:56 - 1.14 +++ CmdParms.pod 13 Sep 2004 21:38:23 - 1.15 @@ -210,7 +210,29 @@ =back +For example here is how to pass arbitrary information to a directive +subroutine: + our @APACHE_MODULE_COMMANDS = ( +{ + name => 'MyDirective1', + func => \&MyDirective, + cmd_data => 'One', +}, +{ + name => 'MyDirective2', + func => \&MyDirective, + cmd_data => 'Two', +}, + ); + + sub MyDirective { +my($self, $parms, $args) = @_; +my $info = $parms->info; + } + +In this example C<$info> will either be 'One' or 'Two' depending on +wether the directive was called as I or I - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: modperl-docs/src/docs/2.0/api/Apache CmdParms.pod
gozer 2004/09/13 14:42:52 Modified:src/docs/2.0/api/Apache CmdParms.pod Log: Rewrite an unclear sentence Revision ChangesPath 1.16 +1 -1 modperl-docs/src/docs/2.0/api/Apache/CmdParms.pod Index: CmdParms.pod === RCS file: /home/cvs/modperl-docs/src/docs/2.0/api/Apache/CmdParms.pod,v retrieving revision 1.15 retrieving revision 1.16 diff -u -r1.15 -r1.16 --- CmdParms.pod 13 Sep 2004 21:38:23 - 1.15 +++ CmdParms.pod 13 Sep 2004 21:42:52 - 1.16 @@ -368,7 +368,7 @@ =head2 C -The server this command is appearing in +The (vhost) server this command was defined in F $s = $parms->server; - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: modperl-docs/src/docs/2.0/api/Apache Module.pod
stas2004/09/13 14:44:06 Modified:src/docs/2.0/api/Apache Module.pod Log: tweaks Revision ChangesPath 1.16 +9 -7 modperl-docs/src/docs/2.0/api/Apache/Module.pod Index: Module.pod === RCS file: /home/cvs/modperl-docs/src/docs/2.0/api/Apache/Module.pod,v retrieving revision 1.15 retrieving revision 1.16 diff -u -u -r1.15 -r1.16 --- Module.pod19 Aug 2004 17:53:57 - 1.15 +++ Module.pod13 Sep 2004 21:44:06 - 1.16 @@ -8,7 +8,7 @@ =head1 Synopsis use Apache::Module (); - + # iterate over the whole module list for (my $modp = Apache::Module->top_module; $modp; $modp = $modp->next) { my $name = $modp->name; @@ -95,10 +95,12 @@ =head2 C -Retrieves a module's configuration. Used by configuration directives. +Retrieve a module's configuration. Used by configuration directives. - $cfg = Apache::Module->get_config($class, $server, [$dir_config]); - $cfg = $self->get_config($server, [$dir_config]); + $cfg = Apache::Module->get_config($class, $server, $dir_config); + $cfg = Apache::Module->get_config($class, $server); + $cfg = $self->get_config($server, $dir_config); + $cfg = $self->get_config($server); =over 4 @@ -107,14 +109,14 @@ =item arg1: C<$class> ( string ) -The perl package this configuration is for +The Perl package this configuration is for -=item arg1: C<$server> +=item arg2: C<$server> ( C> ) The current server, typically C<$r-Eserver> or C<$parms-Eserver> -=item opt arg1: C<$dir_config> +=item opt arg3: C<$dir_config> ( C> ) By default, the configuration returned is the server level one. To retrieve - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: modperl-docs/src/docs/2.0/api/Apache Module.pod
stas2004/09/13 14:53:04 Modified:src/docs/2.0/api/Apache Module.pod Log: add xrefs Revision ChangesPath 1.17 +11 -7 modperl-docs/src/docs/2.0/api/Apache/Module.pod Index: Module.pod === RCS file: /home/cvs/modperl-docs/src/docs/2.0/api/Apache/Module.pod,v retrieving revision 1.16 retrieving revision 1.17 diff -u -u -r1.16 -r1.17 --- Module.pod13 Sep 2004 21:44:06 - 1.16 +++ Module.pod13 Sep 2004 21:53:04 - 1.17 @@ -73,14 +73,14 @@ The C> object that describes all of the directives this module defines. - $commands = $module->cmds(); + $command = $module->cmds(); =over 4 =item obj: C<$module> ( C> ) -=item ret: C<$commands> +=item ret: C<$command> ( C> ) =item since: 1.99_12 @@ -114,14 +114,17 @@ =item arg2: C<$server> ( C> ) -The current server, typically C<$r-Eserver> or C<$parms-Eserver> +The current server, typically +Cserver|docs::2.0::api::Apache::ServerUtil>> or +Cserver|docs::2.0::api::Apache::CmdParms>>. =item opt arg3: C<$dir_config> ( C> ) -By default, the configuration returned is the server level one. To retrieve -the per directory configuration, use C<$r-Eper_dir_config> as a last -argument. +By default, the configuration returned is the server level one. To +retrieve the per directory configuration, use +Cper_dir_config|docs::2.0::api::Apache::RequestRec>> as a +last argument. =item ret: C<$cfg> (HASH reference) @@ -131,7 +134,8 @@ =back -See also L +See also L - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: modperl-docs/src/docs/2.0/api/Apache Module.pod
stas2004/09/13 15:13:06 Modified:src/docs/2.0/api/Apache Module.pod Log: tweaks Revision ChangesPath 1.18 +37 -21modperl-docs/src/docs/2.0/api/Apache/Module.pod Index: Module.pod === RCS file: /home/cvs/modperl-docs/src/docs/2.0/api/Apache/Module.pod,v retrieving revision 1.17 retrieving revision 1.18 diff -u -u -r1.17 -r1.18 --- Module.pod13 Sep 2004 21:53:04 - 1.17 +++ Module.pod13 Sep 2004 22:13:05 - 1.18 @@ -11,11 +11,11 @@ # iterate over the whole module list for (my $modp = Apache::Module->top_module; $modp; $modp = $modp->next) { - my $name = $modp->name; - my $version = $modp->version; + my $name = $modp->name; + my $index = $modp->module_index; + my $version = $modp->version; + my $commands = $modp->cmds; my $minor_version = $modp->minor_version; - my $index = $modp->module_index; - my $commands = $modp->cmds; } # find a specific module @@ -70,8 +70,8 @@ =head2 C -The C> object -that describes all of the directives this module defines. +Get the C> object, +describing all of the directives this module defines. $command = $module->cmds(); @@ -135,7 +135,7 @@ =back See also L +Perl|docs::2.0::user::config::custom>. @@ -157,19 +157,24 @@ =item ret: C<$module> ( C> ) -The module object if found, undef otherwise +The module object if found, C otherwise. =item since: 1.99_12 =back +For example: + + my $module = Apache::Module::find_linked_module('mod_ssl.c'); + + =head2 C -Determines if a certain module is loaded +Determine if a certain module is loaded $loaded = Apache::Module::loaded($module); @@ -179,15 +184,15 @@ The name of the module to search for. -If C<$module> ends with C<.c>, search all the modules, -statically compiled and dynamically loaded. - -If C<$module> ends with C<.so>, search only the dynamically -loaded modules. +If C<$module> ends with C<.c>, search all the modules, statically +compiled and dynamically loaded. -If C<$module> doesn't contain a C<.>, search the loaded Perl +If C<$module> ends with C<.so>, search only the dynamically loaded modules. +If C<$module> doesn't contain a C<.>, search the loaded Perl modules +(checks C<%INC>). + =item ret: C<$loaded> ( boolean ) Returns true if the module is loaded, false otherwise. @@ -223,8 +228,7 @@ =head2 C -API minor version. Provides API feature milestones. Not checked -during module init +Get the module API minor version. $minor_version = $module->minor_version(); @@ -239,13 +243,17 @@ =back +C provides API feature milestones. + +It's not checked during module init. + =head2 C -Index to this modules structures in config vectors. +Get the index to this modules structures in config vectors. $index = $module->module_index(); @@ -266,7 +274,7 @@ =head2 C -The name of the module's C file +Get the name of the module's I<.c> file $name = $module->name(); @@ -281,13 +289,19 @@ =back +For example a mod_perl module, will return: I. + + + + =head2 C -The next module in the list, undef if the last module in the list. +Get the next module in the list, C if this is the last module +in the list. $next_module = $module->next(); @@ -308,6 +322,8 @@ + + =head2 C Remove a module from the list of loaded modules permanently. @@ -354,7 +370,7 @@ =head2 C -API version, B module version; check that module is +Get the API version, B module version; check that module is compatible with this version of the server. $version = $module->version(); - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: modperl-docs/src/docs/2.0/api/Apache CmdParms.pod
stas2004/09/13 15:17:03 Modified:src/docs/2.0/api/Apache CmdParms.pod Log: spel Revision ChangesPath 1.17 +3 -2 modperl-docs/src/docs/2.0/api/Apache/CmdParms.pod Index: CmdParms.pod === RCS file: /home/cvs/modperl-docs/src/docs/2.0/api/Apache/CmdParms.pod,v retrieving revision 1.16 retrieving revision 1.17 diff -u -u -r1.16 -r1.17 --- CmdParms.pod 13 Sep 2004 21:42:52 - 1.16 +++ CmdParms.pod 13 Sep 2004 22:17:03 - 1.17 @@ -231,8 +231,9 @@ my $info = $parms->info; } -In this example C<$info> will either be 'One' or 'Two' depending on -wether the directive was called as I or I +In this example C<$info> will either be C<'One'> or C<'Two'> depending +on whether the directive was called as I or +I. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: modperl-docs/src/docs/2.0/user/config custom.pod
gozer 2004/09/13 15:36:44 Modified:src/docs/2.0/api/Apache Module.pod src/docs/2.0/user/config custom.pod Log: Apache::Module top_module() and get_config() changed from class methods to regular subroutines Revision ChangesPath 1.19 +6 -6 modperl-docs/src/docs/2.0/api/Apache/Module.pod Index: Module.pod === RCS file: /home/cvs/modperl-docs/src/docs/2.0/api/Apache/Module.pod,v retrieving revision 1.18 retrieving revision 1.19 diff -u -r1.18 -r1.19 --- Module.pod13 Sep 2004 22:13:05 - 1.18 +++ Module.pod13 Sep 2004 22:36:44 - 1.19 @@ -10,7 +10,7 @@ use Apache::Module (); # iterate over the whole module list - for (my $modp = Apache::Module->top_module; $modp; $modp = $modp->next) { + for (my $modp = Apache::Module::top_module(); $modp; $modp = $modp->next) { my $name = $modp->name; my $index = $modp->module_index; my $version = $modp->version; @@ -27,7 +27,7 @@ # access module configuration from a directive sub MyDirective { my ($self, $parms, $args) = @_; - my $srv_cfg = Apache::Module->get_config($self, $parms->server); + my $srv_cfg = Apache::Module::get_config($self, $parms->server); [...] } @@ -97,8 +97,8 @@ Retrieve a module's configuration. Used by configuration directives. - $cfg = Apache::Module->get_config($class, $server, $dir_config); - $cfg = Apache::Module->get_config($class, $server); + $cfg = Apache::Module::get_config($class, $server, $dir_config); + $cfg = Apache::Module::get_config($class, $server); $cfg = $self->get_config($server, $dir_config); $cfg = $self->get_config($server); @@ -351,13 +351,13 @@ Returns the first module in the module list. Usefull to start a module iteration. - $ret = Apache::Module->top_module(); + $module = Apache::Module::top_module(); =over 4 =item obj: C ( class name ) -=item ret: C<$ret> +=item ret: C<$module> ( C> ) =item since: 1.99_12 1.11 +6 -6 modperl-docs/src/docs/2.0/user/config/custom.pod Index: custom.pod === RCS file: /home/cvs/modperl-docs/src/docs/2.0/user/config/custom.pod,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- custom.pod12 Jul 2004 23:13:22 - 1.10 +++ custom.pod13 Sep 2004 22:36:44 - 1.11 @@ -743,7 +743,7 @@ use Apache::Module (); ... - my $srv_cfg = Apache::Module->get_config('MyApache::MyParameters', $s); + my $srv_cfg = Apache::Module::get_config('MyApache::MyParameters', $s); print $srv_cfg->{name}; If a request is made to a resource inside a virtual host, C<$srv_cfg> @@ -755,7 +755,7 @@ use Apache::ServerUtil (); ... if ($s->is_virtual) { - my $base_srv_cfg = Apache::Module->get_config('MyApache::MyParameters', + my $base_srv_cfg = Apache::Module::get_config('MyApache::MyParameters', Apache->server); print $base_srv_cfg->{name}; } @@ -823,7 +823,7 @@ use Apache::Module (); ... - my $dir_cfg = Apache::Module->get_config('MyApache::MyParameters', + my $dir_cfg = Apache::Module::get_config('MyApache::MyParameters', $s, $r->per_dir_config); print $dir_cfg->{foo}; @@ -890,7 +890,7 @@ my($key, $self, $parms, $arg) = @_; $self->{$key} = $arg; unless ($parms->path) { - my $srv_cfg = Apache::Module->get_config($self, + my $srv_cfg = Apache::Module::get_config($self, $parms->server); $srv_cfg->{$key} = $arg; } @@ -900,7 +900,7 @@ my($key, $self, $parms, $arg) = @_; push @{ $self->{$key} }, $arg; unless ($parms->path) { - my $srv_cfg = Apache::Module->get_config($self, + my $srv_cfg = Apache::Module::get_config($self, $parms->server); push @{ $srv_cfg->{$key} }, $arg; } @@ -1064,7 +1064,7 @@ use Apache::Const -compile => qw(OK); sub get_config { - Apache::Module->get_config('MyApache::CustomDirectives', @_); + Apache::Module::get_config('MyApache::CustomDirectives', @_); } sub handler { - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: modperl-docs/src/docs/2.0/api/Apache Module.pod
gozer 2004/09/13 15:37:30 Modified:src/docs/2.0/api/Apache Module.pod Log: Clarify the meaning of $module->version Revision ChangesPath 1.20 +3 -2 modperl-docs/src/docs/2.0/api/Apache/Module.pod Index: Module.pod === RCS file: /home/cvs/modperl-docs/src/docs/2.0/api/Apache/Module.pod,v retrieving revision 1.19 retrieving revision 1.20 diff -u -r1.19 -r1.20 --- Module.pod13 Sep 2004 22:36:44 - 1.19 +++ Module.pod13 Sep 2004 22:37:30 - 1.20 @@ -370,8 +370,9 @@ =head2 C -Get the API version, B module version; check that module is -compatible with this version of the server. +Get the httpd API version this module was build against, B +the module's version; Used to check that module is compatible +with this version of the server before loading it. $version = $module->version(); - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: modperl-docs/src/docs/2.0/api/Apache Module.pod
stas2004/09/13 15:52:46 Modified:src/docs/2.0/api/Apache Module.pod Log: fix Revision ChangesPath 1.21 +0 -2 modperl-docs/src/docs/2.0/api/Apache/Module.pod Index: Module.pod === RCS file: /home/cvs/modperl-docs/src/docs/2.0/api/Apache/Module.pod,v retrieving revision 1.20 retrieving revision 1.21 diff -u -u -r1.20 -r1.21 --- Module.pod13 Sep 2004 22:37:30 - 1.20 +++ Module.pod13 Sep 2004 22:52:46 - 1.21 @@ -355,8 +355,6 @@ =over 4 -=item obj: C ( class name ) - =item ret: C<$module> ( C> ) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: modperl-docs/src/docs/2.0/api/Apache Directive.pod
stas2004/09/13 16:22:18 Modified:src/docs/2.0/api/Apache Directive.pod Log: various fixes Revision ChangesPath 1.9 +57 -44modperl-docs/src/docs/2.0/api/Apache/Directive.pod Index: Directive.pod === RCS file: /home/cvs/modperl-docs/src/docs/2.0/api/Apache/Directive.pod,v retrieving revision 1.8 retrieving revision 1.9 diff -u -u -r1.8 -r1.9 --- Directive.pod 13 Sep 2004 18:42:55 - 1.8 +++ Directive.pod 13 Sep 2004 23:22:18 - 1.9 @@ -17,7 +17,7 @@ my $servername = $vhost->{'ServerName'}; use Data::Dumper; - print Dumper($tree->as_hash); + print Dumper $tree->as_hash; my $node = $tree; while ($node) { @@ -32,7 +32,7 @@ if (my $kid = $node->first_child) { $node = $kid; - } + } elsif (my $next = $node->next) { $node = $next; } @@ -67,12 +67,11 @@ -=head2 C +=head2 C -The arguments for the current directive, stored as a space separated -list +Get the arguments for the current directive: - $args = $node->args(); + $args = $node->args(); =over 4 @@ -81,15 +80,20 @@ =item ret: C<$args> ( string ) +Arguments are separated by a whitespace in the string. + =item since: 1.99_12 =back + + + =head2 C -Returns a hash representation of the configuration tree, in a format +Get a hash representation of the configuration tree, in a format suitable for inclusion in EPerlE sections. $config_hash = $conftree->as_hash(); @@ -101,7 +105,7 @@ The config tree to stringify -=item ret: C<$config_hash> (HASH) +=item ret: C<$config_hash> ( HASH reference ) =item since: 1.99_12 @@ -112,9 +116,10 @@ + =head2 C -Returns a string representation of the configuration node, in +Get a string representation of the configuration node, in F format. This does not traverse down to sub-trees. $string = $node->as_string(); @@ -134,17 +139,23 @@ + + + + + =head2 C -Returns the root of the configuration tree. +Get the root of the configuration tree: - $tree = Apache::Directive->conftree(); + $conftree = Apache::Directive->conftree(); =over 4 -=item obj: C (class name) +=item obj: C ( class name ) -=item ret: C<$tree> ( C> ) +=item ret: C<$conftree> +( C> ) =item since: 1.99_12 @@ -154,9 +165,11 @@ + + =head2 C -Returns the name of the directive in C<$node>. +Get the name of the directive in C<$node>: $name = $node->directive(); @@ -165,7 +178,7 @@ =item obj: C<$node> ( C> ) -=item ret: C<$directive> ( string ) +=item ret: C<$name> ( string ) =item since: 1.99_12 @@ -175,9 +188,11 @@ + + =head2 C -Returns the filename the configuration node was created from +Get the F the configuration node was created from: $filename = $node->filename(); @@ -196,11 +211,13 @@ + + =head2 C -The first child node of this directive +Get the first child node of this directive: - $subtree = $node->first_child; + $child_node = $node->first_child; =over 4 @@ -219,9 +236,13 @@ + + + + =head2 C -Returns the line number in C this node was created from +Get the line number in a F this node was created at: $lineno = $node->line_num(); @@ -239,9 +260,13 @@ + + + + =head2 C -Returns node(s) matching a certain value. +Get the node(s) matching a certain value. $node = $conftree->lookup($directive, $args); @nodes = $conftree->lookup($directive, $args); @@ -261,21 +286,21 @@ Optional args to the directive to filter for -=item ret: C<$string> ( string / ARRAY of HASHES ) +=item ret: C<$string> ( string / ARRAY of HASH refs ) -In list context, it will return all matching nodes. +In LIST context, it returns all matching nodes. -In scalar context, it will return only the first matching node. +In SCALAR context, it returns only the first matching node. -If called with only C<$directive> value, this will return all nodes +If called with only C<$directive> value, this method returns all nodes from that directive. For example: @Alias = $conftree->lookup('Alias'); -would return all nodes for Alias directives. +returns all nodes for C directives. -If called with an extra C<$args> argument, this will return only nodes -where both the directive and the args matched. For example: +If called with an extra C<$args> argument, it returns only nodes where +both the directive and the args matched. For example: $VHost = $tree->lookup('VirtualHost',
cvs commit: modperl-docs/src/docs/2.0/api/Apache compat.pod
gozer 2004/09/13 16:36:55 Modified:src/docs/2.0/api/Apache compat.pod Log: Apache::Module top_module() and get_config() as class methods added to Apache::compat for backwards compatibility Documented 2 missing compat functions: Apache::Util::ht_time APR::URI::unparse Revision ChangesPath 1.11 +7 -1 modperl-docs/src/docs/2.0/api/Apache/compat.pod Index: compat.pod === RCS file: /home/cvs/modperl-docs/src/docs/2.0/api/Apache/compat.pod,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- compat.pod18 Aug 2004 07:13:39 - 1.10 +++ compat.pod13 Sep 2004 23:36:55 - 1.11 @@ -121,7 +121,13 @@ =item * C -=item * C +=item * C + +=item * C + +=item * C + +=item * C =back - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]