perl-docs-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject cvs commit: modperl-docs/src/docs/2.0/api/Apache ServerUtil.pod RequestUtil.pod
Date Sat, 10 Jan 2004 03:40:52 GMT
stas        2004/01/09 19:40:52

  Modified:    src/docs/2.0/api/Apache ServerUtil.pod RequestUtil.pod
  Log:
  document the new API: ($r|$s)->is_perl_option_enabled($flag);
  
  Revision  Changes    Path
  1.4       +25 -0     modperl-docs/src/docs/2.0/api/Apache/ServerUtil.pod
  
  Index: ServerUtil.pod
  ===================================================================
  RCS file: /home/cvs/modperl-docs/src/docs/2.0/api/Apache/ServerUtil.pod,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -u -r1.3 -r1.4
  --- ServerUtil.pod	10 Jan 2004 03:37:18 -0000	1.3
  +++ ServerUtil.pod	10 Jan 2004 03:40:52 -0000	1.4
  @@ -14,6 +14,11 @@
     
     # get 'log/' dir path using default server startup pool
     my $log_dir = Apache::server_root_relative('log');
  +  
  +  # server level PerlOptions flags lookup
  +  $s->push_handlers(ChildExit => \&child_exit)
  +      if $s->is_perl_option_enabled('ChildExit');
  +
   
   =head1 DESCRIPTION
   
  @@ -117,5 +122,25 @@
   =head2 add_handlers()
   
   =head2 get_handlers()
  +
  +
  +=head2 is_perl_option_enabled()
  +
  +  my $result = $s->is_perl_option_enabled($flag);
  +
  +check whether a server level PerlOptions flag is enabled or not. For
  +example to check whether the C<ChildExit> hook is enabled (which can
  +be disabled with C<PerlOptions -ChildExit>) and configure some
  +handlers to run if enabled:
  +
  +  $s->push_handlers(ChildExit => \&child_exit)
  +      if $s->is_perl_option_enabled('ChildExit');
  +
  +See also:
  +L<PerlOptions|docs::2.0::user::config::config/C_PerlOptions_> and
  +L<the equivalent function for directory level PerlOptions
  +flags|docs::2.0::api::Apache::RequestUtil/is_perl_option_enabled__>.
  +
  +
   
   =cut
  
  
  
  1.5       +20 -0     modperl-docs/src/docs/2.0/api/Apache/RequestUtil.pod
  
  Index: RequestUtil.pod
  ===================================================================
  RCS file: /home/cvs/modperl-docs/src/docs/2.0/api/Apache/RequestUtil.pod,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -u -r1.4 -r1.5
  --- RequestUtil.pod	30 Aug 2003 02:56:40 -0000	1.4
  +++ RequestUtil.pod	10 Jan 2004 03:40:52 -0000	1.5
  @@ -6,6 +6,10 @@
   
     use Apache::RequestUtil;
   
  +  # directory level PerlOptions flags lookup
  +  $r->subprocess_env unless $r->is_perl_option_enabled('SetupEnv');
  +
  +
   =head1 DESCRIPTION
   
   C<Apache::RequestUtil> provides the Perl API for Apache request object.
  @@ -79,5 +83,21 @@
   C<L<ModPerl::Registry|docs::2.0::api::ModPerl::Registry>> handler and
   friends, because the CGI scripts that it reads are considered safe
   (you could just as well C<require()> them).
  +
  +
  +=head2 is_perl_option_enabled()
  +
  +  my $result = $r->is_perl_option_enabled($flag);
  +
  +check whether a directory level PerlOptions flag is enabled or
  +not. For example to check whether the C<SetupEnv> option is enabled
  +for the current request (which can be disabled with C<PerlOptions
  +-SetupEnv>) and populate the environment variables table if disabled:
  +
  +  $r->subprocess_env unless $r->is_perl_option_enabled('SetupEnv');
  +
  +See also: L<PerlOptions|docs::2.0::user::config::config/C_PerlOptions_> and
  +L<the equivalent function for server level PerlOptions flags|docs::2.0::api::Apache::ServerUtil/is_perl_option_enabled__>.
  +
   
   =cut
  
  
  

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


Mime
View raw message