stas        2002/08/12 20:18:48

  Modified:    Apache   Apache.pm
               .        Changes
  Log:
  document the server_root_relative() method
  
  Revision  Changes    Path
  1.72      +28 -1     modperl/Apache/Apache.pm
  
  Index: Apache.pm
  ===================================================================
  RCS file: /home/cvs/modperl/Apache/Apache.pm,v
  retrieving revision 1.71
  retrieving revision 1.72
  diff -u -r1.71 -r1.72
  --- Apache.pm 16 May 2002 15:21:46 -0000      1.71
  +++ Apache.pm 13 Aug 2002 03:18:48 -0000      1.72
  @@ -656,7 +656,7 @@
   authentication realm, from C<$r-E<gt>auth_name>, to determine which set of
   credentials to authenticate.
   
  -=item $r-E<gt>document_root ( [$docroot] )
  +=item $r-E<gt>document_root( [$docroot] )
   
   When called with no argument, returns a reference to the current value
   of the per server configuration directive B<DocumentRoot>. To quote the
  @@ -678,6 +678,33 @@
        }
       
      PerlTransHandler trans_handler
  +
  +=item $r-E<gt>server_root_relative( [$relative_path] )
  +
  +If called without any arguments, this method returns the value of the
  +currently-configured C<ServerRoot> directory.
  +
  +If a single argument is passed, it concatenates it with the value of
  +C<ServerRoot>. For example here is how to get the path to the
  +I<error_log> file under the server root:
  +
  + my $error_log = $r->server_root_relative("logs/error_log");
  +
  +See also the next item.
  +
  +=item Apache-E<gt>server_root_relative( [$relative_path] )
  +
  +Same as the previous item, but this time it's used without a request
  +object. This method is usually needed in a startup file. For example
  +the following startup file modifies C<@INC> to add a local directory
  +with perl modules located under the server root and after that loads a
  +module from that directory.
  +
  +  BEGIN {
  +      use Apache():
  +      use lib Apache->server_root_relative("lib/my_project");
  +  }
  +  use MyProject::Config ();
   
   =item $r-E<gt>allow_options
   
  
  
  
  1.656     +2 -0      modperl/Changes
  
  Index: Changes
  ===================================================================
  RCS file: /home/cvs/modperl/Changes,v
  retrieving revision 1.655
  retrieving revision 1.656
  diff -u -r1.655 -r1.656
  --- Changes   12 Aug 2002 07:11:39 -0000      1.655
  +++ Changes   13 Aug 2002 03:18:48 -0000      1.656
  @@ -10,6 +10,8 @@
   
   =item 1.27_01-dev
   
  +document the server_root_relative() method [Stas Bekman <[EMAIL PROTECTED]>]
  +
   eliminate warnings when flushing functions with empty () prototypes in
   Apache::PerlRun::flush_namespace [Yair Lenga <[EMAIL PROTECTED]>]
   
  
  
  


Reply via email to