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 st...@apache.org on 2002/05/14 12:40:10 UTC

cvs commit: modperl-docs/src/docs/2.0/api config.cfg

stas        02/05/14 03:40:10

  Modified:    lib/Apache Reload.pm
               src/docs/2.0/api config.cfg
  Added:       src/docs/2.0/api/mod_perl-2.0/Apache Reload.pod
  Log:
  - move the Apache::Reload doc into the docs area
  - mark it up
  
  Revision  Changes    Path
  1.4       +0 -115    modperl-2.0/lib/Apache/Reload.pm
  
  Index: Reload.pm
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/lib/Apache/Reload.pm,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- Reload.pm	7 Apr 2002 17:56:46 -0000	1.3
  +++ Reload.pm	14 May 2002 10:40:10 -0000	1.4
  @@ -141,118 +141,3 @@
   
   1;
   __END__
  -
  -=head1 NAME
  -
  -Apache::Reload - Reload changed modules
  -
  -=head1 SYNOPSIS
  -
  -In httpd.conf:
  -
  -  PerlInitHandler Apache::Reload
  -  PerlSetVar ReloadAll Off
  -  #PerlSetVar ReloadDebug On
  -
  -Then your module:
  -
  -  package My::Apache::Module;
  -
  -  use Apache::Reload;
  -  
  -  sub handler { ... }
  -  
  -  1;
  -
  -=head1 DESCRIPTION
  -
  -This module is two things. First it is an adaptation of Randal
  -Schwartz's Stonehenge::Reload module that attempts to be a little 
  -more intuitive and makes the usage easier. Stonehenge::Reload was
  -written by Randal to make specific modules reload themselves when
  -they changed. Unlike Apache::StatINC, Stonehenge::Reload only checked
  -the change time of modules that registered themselves with 
  -Stonehenge::Reload, thus reducing stat() calls. Apache::Reload also
  -offers the exact same functionality as Apache::StatINC, and is thus
  -designed to be a drop-in replacement. Apache::Reload only checks modules
  -that register themselves with Apache::Reload if you explicitly turn off
  -the StatINC emulation method (see below). Like Apache::StatINC,
  -Apache::Reload must be installed as an Init Handler.
  -
  -=head2 StatINC Replacement
  -
  -To use as a StatINC replacement, simply add the following configuration
  -to your httpd.conf:
  -
  -  PerlInitHandler Apache::Reload
  -
  -=head2 Register Modules Implicitly
  -
  -To only reload modules that have registered with Apache::Reload,
  -add the following to the httpd.conf:
  -
  -  PerlInitHandler Apache::Reload
  -  PerlSetVar ReloadAll Off
  -  # ReloadAll defaults to On
  -
  -Then any modules with the line:
  -
  -  use Apache::Reload;
  -
  -Will be reloaded when they change.
  -
  -=head2 Register Modules Explicitly
  -
  -You can also register modules explicitly in your httpd.conf file that
  -you want to be reloaded on change:
  -
  -  PerlInitHandler Apache::Reload
  -  PerlSetVar ReloadAll Off
  -  PerlSetVar ReloadModules "My::Foo My::Bar Foo::Bar::Test"
  -
  -Note that these are split on whitespace, but the module list B<must>
  -be in quotes, otherwise Apache tries to parse the parameter list.
  -
  -=head2 Special "Touch" File
  -
  -You can also set a file that you can touch() that causes the reloads to be
  -performed. If you set this, and don't touch() the file, the reloads don't
  -happen. This can be a great boon in a live environment:
  -
  -  PerlSetVar ReloadTouchFile /tmp/reload_modules
  -
  -Now when you're happy with your changes, simply go to the command line and
  -type:
  -
  -  % touch /tmp/reload_modules
  -
  -And your modules will be magically reloaded on the next request. This option
  -works in both StatINC emulation mode and the registered modules mode.
  -
  -=head2 Debug
  -
  -You can enable the debugging mode with the setting:
  -
  -  PerlSetVar ReloadDebug On
  -
  -=head1 PSUEDOHASHES
  -
  -The short summary of this is: Don't use psuedohashes. Use an array with
  -constant indexes. Its faster in the general case, its more guaranteed, and
  -generally, it works.
  -
  -The long summary is that I've done some work to get this working with
  -modules that use psuedo hashes, but its still broken in the case of a
  -single module that contains multiple packages that all use psuedohashes.
  -
  -So don't do that.
  -
  -=head1 AUTHOR
  -
  -Matt Sergeant, matt@sergeant.org
  -
  -=head1 SEE ALSO
  -
  -Stonehenge::Reload
  -
  -=cut
  
  
  
  1.1                  modperl-docs/src/docs/2.0/api/mod_perl-2.0/Apache/Reload.pod
  
  Index: Reload.pod
  ===================================================================
  
  =head1 NAME
  
  Apache::Reload - Reload changed modules
  
  =head1 Synopsis
  
  In I<httpd.conf>:
  
    PerlInitHandler Apache::Reload
    PerlSetVar ReloadAll Off
    #PerlSetVar ReloadDebug On
  
  Then your module:
  
    package My::Apache::Module;
  
    use Apache::Reload;
    
    sub handler { ... }
    
    1;
  
  =head1 Description
  
  This module is two things. First it is an adaptation of Randal
  Schwartz's C<Stonehenge::Reload> module that attempts to be a little
  more intuitive and makes the usage easier. C<Stonehenge::Reload> was
  written by Randal to make specific modules reload themselves when they
  changed. Unlike C<Apache::StatINC>, C<Stonehenge::Reload> only checked
  the change time of modules that registered themselves with
  C<Stonehenge::Reload>, thus reducing stat() calls. C<Apache::Reload>
  also offers the exact same functionality as C<Apache::StatINC>, and is
  thus designed to be a drop-in replacement. C<Apache::Reload> only
  checks modules that register themselves with C<Apache::Reload> if you
  explicitly turn off the StatINC emulation method (see below). Like
  C<Apache::StatINC>, C<Apache::Reload> must be installed as an Init
  Handler.
  
  =head2 StatINC Replacement
  
  To use as a StatINC replacement, simply add the following
  configuration to your I<httpd.conf>:
  
    PerlInitHandler Apache::Reload
  
  =head2 Register Modules Implicitly
  
  To only reload modules that have registered with C<Apache::Reload>,
  add the following to the I<httpd.conf>:
  
    PerlInitHandler Apache::Reload
    PerlSetVar ReloadAll Off
    # ReloadAll defaults to On
  
  Then any modules with the line:
  
    use Apache::Reload;
  
  Will be reloaded when they change.
  
  =head2 Register Modules Explicitly
  
  You can also register modules explicitly in your I<httpd.conf> file
  that you want to be reloaded on change:
  
    PerlInitHandler Apache::Reload
    PerlSetVar ReloadAll Off
    PerlSetVar ReloadModules "My::Foo My::Bar Foo::Bar::Test"
  
  Note that these are split on whitespace, but the module list B<must>
  be in quotes, otherwise Apache tries to parse the parameter list.
  
  =head2 Special "Touch" File
  
  You can also set a file that you can C<touch(1)> that causes the
  reloads to be performed. If you set this, and don't C<touch(1)> the
  file, the reloads don't happen. This can be a great boon in a live
  environment:
  
    PerlSetVar ReloadTouchFile /tmp/reload_modules
  
  Now when you're happy with your changes, simply go to the command line and
  type:
  
    % touch /tmp/reload_modules
  
  And your modules will be magically reloaded on the next request. This
  option works in both C<Apache::StatINC> emulation mode and the
  registered modules mode.
  
  =head2 Debug
  
  You can enable the debugging mode with the setting:
  
    PerlSetVar ReloadDebug On
  
  =head1 PSUEDOHASHES
  
  The short summary of this is: Don't use psuedohashes. Use an array
  with constant indexes. Its faster in the general case, its more
  guaranteed, and generally, it works.
  
  The long summary is that I've done some work to get this working with
  modules that use psuedo hashes, but its still broken in the case of a
  single module that contains multiple packages that all use
  psuedohashes.
  
  So don't do that.
  
  =head1 AUTHOR
  
  Matt Sergeant, matt@sergeant.org
  
  =head1 SEE ALSO
  
  C<Stonehenge::Reload>
  
  =cut
  
  
  
  1.4       +1 -0      modperl-docs/src/docs/2.0/api/config.cfg
  
  Index: config.cfg
  ===================================================================
  RCS file: /home/cvs/modperl-docs/src/docs/2.0/api/config.cfg,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- config.cfg	3 Apr 2002 07:46:13 -0000	1.3
  +++ config.cfg	14 May 2002 10:40:10 -0000	1.4
  @@ -17,6 +17,7 @@
           mod_perl-2.0/Apache/RequestRec.pod
           mod_perl-2.0/Apache/ServerUtil.pod
           mod_perl-2.0/Apache/compat.pod
  +        mod_perl-2.0/Apache/Reload.pod
       )],
   
       group    => 'APR',
  
  
  

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