You are viewing a plain text version of this content. The canonical link for it is here.
Posted to docs-cvs@perl.apache.org by go...@apache.org on 2004/08/11 01:02:02 UTC

cvs commit: modperl-docs/src/docs/2.0/api/Apache Directive.pod

gozer       2004/08/10 16:02:01

  Modified:    src/docs/2.0/api/Apache Directive.pod
  Log:
  Reviewed and completed Apache::Directive API documentation
  
  Revision  Changes    Path
  1.7       +10 -124   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.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- Directive.pod	10 Aug 2004 03:15:52 -0000	1.6
  +++ Directive.pod	10 Aug 2004 23:02:01 -0000	1.7
  @@ -16,14 +16,13 @@
     my $vhost = $tree->lookup('VirtualHost', 'localhost:8000');
     my $servername = $vhost->{'ServerName'};
     
  -  print $tree->as_string;
  -  
     use Data::Dumper;
     print Dumper($tree->as_hash);
     
     my $node = $tree;
     while ($node) {
  -  
  +      print $node->as_string;
  +
         #do something with $node
     
         if (my $kid = $node->first_child) {
  @@ -55,7 +54,7 @@
   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<All these methods are read-only>
   
   
   
  @@ -69,48 +68,18 @@
   
   
   
  -Comments for Philippe:
  -
  -  should the elements of ap_directive_t elements be writable? if not
  -  set those to readonly, e.g to set args to read only change
  -  xs/maps/apache_structures.map and add '<' at the beginning of the
  -  line:
  -
  -  <ap_directive_t>
  -     directive
  -  <  args
  -     next
  -     ...
  -   </ap_directive_t>
  -
  -  in either case make sure to adjust the docs whether each method is
  -  readonly or read/write.
  -
  -
  -
  -
  -
  -
  -
  -=head2 C<args>
  -
  -META: Autogenerated - needs to be reviewed/completed
  +=head2 C<args> 
   
   The arguments for the current directive, stored as a space separated
   list
   
     $args      = $node->args();
  -  $prev_args = $node->args($new_val);
   
   =over 4
   
   =item obj: C<$node>
   ( C<L<Apache::Directive object|docs::2.0::api::Apache::Directive>> )
   
  -=item opt arg1: C<$new_val>) ( string )
  -
  -XXX
  -
   =item ret: C<$args> ( string )
   
   =item since: 1.99_12
  @@ -121,10 +90,8 @@
   
   =head2 C<as_hash>
   
  -META: Autogenerated - needs to be reviewed/completed
  -
   Returns a hash representation of the configuration tree, in a format
  -suitable for inclusion in the E<lt>PerlE<gt> sections.
  +suitable for inclusion in E<lt>PerlE<gt> sections.
   
      $config_hash = $conftree->as_hash();
   
  @@ -148,16 +115,14 @@
   
   =head2 C<as_string>
   
  -META: Autogenerated - needs to be reviewed/completed
  -
  -Returns a string representation of the configuration tree, in
  -F<httpd.conf> format.
  +Returns a string representation of the configuration node, in
  +F<httpd.conf> format. This does not traverse down to sub-trees.
   
  -   $string = $conftree->as_string();
  +   $string = $node->as_string();
   
   =over 4
   
  -=item obj: C<$conftree>
  +=item obj: C<$node>
   ( C<L<Apache::Directive object|docs::2.0::api::Apache::Directive>> )
   
   The config tree to stringify
  @@ -172,8 +137,6 @@
   
   =head2 C<conftree>
   
  -META: Autogenerated - needs to be reviewed/completed
  -
   Returns the root of the configuration tree.
   
     $tree = Apache::Directive->conftree();
  @@ -192,37 +155,8 @@
   
   
   
  -=head2 C<data>
  -
  -META: Autogenerated - needs to be reviewed/completed
  -
  -directive's module can store add'l data here
  -
  -  $ret = $conftree->data($newval);
  -
  -=over 4
  -
  -=item obj: C<$conftree>
  -( C<L<Apache::Directive object|docs::2.0::api::Apache::Directive>> )
  -
  -=item arg1: C<$newval> XXX
  -
  -=item ret: XXX
  -
  -=item since: 1.99_12
  -
  -=back
  -
  -
  -
  -
  -
  -
  -
   =head2 C<directive>
   
  -META: Autogenerated - needs to be reviewed/completed
  -
   Returns the name of the directive in C<$node>.
   
     $name = $node->directive();
  @@ -244,8 +178,6 @@
   
   =head2 C<filename>
   
  -META: Autogenerated - needs to be reviewed/completed
  -
   Returns the filename the configuration node was created from
   
     $filename = $node->filename();
  @@ -267,8 +199,6 @@
   
   =head2 C<first_child>
   
  -META: Autogenerated - needs to be reviewed/completed
  -
   The first child node of this directive
   
     $subtree = $node->first_child;
  @@ -292,8 +222,6 @@
   
   =head2 C<line_num>
   
  -META: Autogenerated - needs to be reviewed/completed
  -
   Returns the line number in C<filename> this node was created from
   
     $lineno = $node->line_num();
  @@ -314,8 +242,6 @@
   
   =head2 C<lookup>
   
  -META: Autogenerated - needs to be reviewed/completed
  -
   Returns node(s) matching a certain value.
   
     $node  = $conftree->lookup($directive, $args);
  @@ -332,7 +258,7 @@
   
   =item opt arg2: C<args> ( string )
   
  -=item ret: C<$string> ( string )
  +=item ret: C<$string> ( string / ARRAY of HASHES )
   
   In list context, it will return all matching nodes.
   
  @@ -379,8 +305,6 @@
   
   =head2 C<next>
   
  -META: Autogenerated - needs to be reviewed/completed
  -
   The next directive node in the tree
   
     $next_node = $node->next();
  @@ -406,8 +330,6 @@
   
   =head2 C<parent>
   
  -META: Autogenerated - needs to be reviewed/completed
  -
   The parent node of this directive
   
     $parent_node = $node->parent();
  @@ -420,42 +342,6 @@
   ( C<L<Apache::Directive object|docs::2.0::api::Apache::Directive>> )
   
   Returns the parent of C<$node>, C<undef> if this node is the root node
  -
  -=item since: 1.99_12
  -
  -=back
  -
  -
  -
  -
  -=head2 C<walk_config>
  -
  -META: Autogenerated - needs to be reviewed/completed
  -
  -Walk a config tree and setup the server's internal structures
  -
  -  $ret = $conftree->walk_config($cmdparms, $section_vector);
  -
  -=over 4
  -
  -=item obj: C<$conftree>
  -( C<L<Apache::Directive object|docs::2.0::api::Apache::Directive>> )
  -
  -The config tree to walk
  -
  -=item arg1: C<$cmdparms>
  -(C<L<Apache::CmdParms|docs::2.0::api::Apache::CmdParms>>)
  -
  -The cmd_parms to pass to all functions
  -
  -=item arg2: C<$section_vector>
  -(C<L<Apache::ConfVector|docs::2.0::api::Apache::ConfVector>>)
  -
  -The per-section config vector.
  -
  -=item ret: C<$ret> ( string )
  -
  -Error string on error, C<undef> otherwise
   
   =item since: 1.99_12
   
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: docs-cvs-unsubscribe@perl.apache.org
For additional commands, e-mail: docs-cvs-help@perl.apache.org