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 2004/04/27 19:49:22 UTC

cvs commit: modperl-docs/src/docs/2.0/user/porting compat.pod

stas        2004/04/27 10:49:22

  Modified:    src/docs/2.0/user/porting compat.pod
  Log:
  how to trigger an early server startup
  
  Revision  Changes    Path
  1.48      +33 -0     modperl-docs/src/docs/2.0/user/porting/compat.pod
  
  Index: compat.pod
  ===================================================================
  RCS file: /home/cvs/modperl-docs/src/docs/2.0/user/porting/compat.pod,v
  retrieving revision 1.47
  retrieving revision 1.48
  diff -u -u -r1.47 -r1.48
  --- compat.pod	24 Mar 2004 01:12:24 -0000	1.47
  +++ compat.pod	27 Apr 2004 17:49:22 -0000	1.48
  @@ -117,6 +117,39 @@
   =back
   
   
  +=head1 Server Startup
  +
  +mod_perl 1.0 was always running its startup code immediately at the
  +server startup. On a big setup it was causing a slow startup, since
  +Apache always starts and immediately restarts itself, running the
  +startup code twice. Therefore in mod_perl 2.0, by default perl won't
  +be started until after the configuration phase. So, if for example you
  +run:
  +
  +  % apachectl configtest
  +
  +none of your perl code will be executed.
  +
  +There are two cases when mod_perl 2.0 is forced to start early. First,
  +is when
  +C<L<PerlLoadModule|docs::2.0::user::config::config/C_PerlLoadModule_>>
  +is used and the second is
  +C<L<E<lt>PerlE<gt>|docs::2.0::api::Apache::PerlSections>> sections,
  +both requiring a running perl, and triggering an early server startup.
  +
  +Therefore at the moment, if you want to trigger an early startup, like
  +mod_perl 1.0 does, just add an empty
  +C<L<E<lt>PerlE<gt>|docs::2.0::api::Apache::PerlSections>> section:
  +
  +  <Perl>
  +  # trigger an early startup
  +  </Perl>
  +
  +Right after loading the mod_perl module in F<httpd.conf> if you are
  +using DSO, or just before your mod_perl configuration if you using a
  +static build.
  +
  +
   =head1 Code Porting
   
   mod_perl 2.0 is trying hard to be back compatible with mod_perl
  
  
  

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