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 RequestUtil.pod
Date Sun, 22 Feb 2004 04:00:50 GMT
stas        2004/02/21 20:00:50

  Modified:    src/docs/2.0/user/porting compat.pod
               src/docs/2.0/api/Apache RequestUtil.pod
  Log:
  (get|set|push)_handlers api docs
  
  Revision  Changes    Path
  1.40      +16 -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.39
  retrieving revision 1.40
  diff -u -u -r1.39 -r1.40
  --- compat.pod	9 Feb 2004 20:28:39 -0000	1.39
  +++ compat.pod	22 Feb 2004 04:00:50 -0000	1.40
  @@ -583,6 +583,22 @@
   C<Apache-E<gt>set_handlers> is avalable via
   C<L<Apache::compat|docs::2.0::api::Apache::compat>>.
   
  +To reset the list of handlers, instead of doing:
  +
  +  $r->set_handlers( PerlAuthenHandler => [ \&OK ] );
  +
  +do:
  +
  +  $r->set_handlers(PerlCleanupHandler => []);
  +
  +or
  +
  +  $r->set_handlers(PerlCleanupHandler => undef);
  +
  +See
  +C<L<Apache::RequestUtil|docs::2.0::api::Apache::RequestUtil/C_set_handlers_>>.
  +
  +
   =head2 C<Apache-E<gt>httpd_conf>
   
   C<Apache-E<gt>httpd_conf> is now C<$s-E<gt>add_config> or
  
  
  
  1.10      +55 -23    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.9
  retrieving revision 1.10
  diff -u -u -r1.9 -r1.10
  --- RequestUtil.pod	19 Jan 2004 19:22:25 -0000	1.9
  +++ RequestUtil.pod	22 Feb 2004 04:00:50 -0000	1.10
  @@ -314,7 +314,7 @@
   Returns a reference to a list of handlers enabled for
   a given phase.
   
  -  @handlers = $r->get_handlers($hook_name);
  +  $handlers_list = $r->get_handlers($hook_name);
   
   =over 4
   
  @@ -326,26 +326,26 @@
   
   =item ret: C<@handlers> (CODE ref or ref to ARRAY of CODE refs)
   
  -a list of references to the handler subroutines
  +a list of handler subroutines CODE references
   
   =back
   
   For example:
   
  -  @handlers = $r->get_handlers('PerlResponseHandler');
  +A list of handlers configured to run at the response phase:
   
  +  my @handlers = @{ $r->get_handlers('PerlResponseHandler') || '' };
   
   
   
  -=head2 C<push_handlers>
   
  -META: Autogenerated - needs to be reviewed/completed
  +=head2 C<push_handlers>
   
   Add one or more handlers to a list of handlers to be called for a
   given phase.
   
     $r->push_handlers($hook_name => \&handler);
  -  $r->push_handlers($hook_name => [\&handler, \&handler2]);
  +  $r->push_handlers($hook_name => ['Foo::Bar::handler', \&handler2]);
   
   =over 4
   
  @@ -353,12 +353,15 @@
   
   =item arg2: C<$hook_name> (string)
   
  -a string representing the phase to handle. 
  +a string representing the phase to handle.
  +
  +=item arg3: C<$handlers> (CODE ref or SUB name or ref to an ARRAY of CODE refs)
   
  -=item arg3: C<$handlers> (CODE ref or ref to ARRAY of CODE refs)
  +a reference to a single handler CODE reference or just a name of the
  +subroutine (fully qualified unless defined in the current package).
   
  -a reference to a list of references to the handler subroutines, or a
  -single reference to a handler subroutine
  +if more than one passed, use a reference to an array of CODE refs
  +and/or subroutine names.
   
   =item ret: no return value
   
  @@ -366,22 +369,30 @@
   
   Examples:
   
  +A single handler:
  +
     $r->push_handlers(PerlResponseHandler => \&handler);
  -  $r->push_handlers(PerlResponseHandler => [\&handler, \&handler2]);
   
  -  # XXX: not implemented yet
  -  $r->push_handlers(PerlResponseHandler => sub {...});
  +Multiple handlers:
   
  +  $r->push_handlers(PerlFixupHandler => ['Foo::Bar::handler', \&handler2]);
   
  +Anonymous functions:
   
  -=head2 C<set_handlers>
  +  $r->push_handlers(PerlLogHandler => sub { return Apache::OK });
   
  -META: Autogenerated - needs to be reviewed/completed
   
  -Set a list of handlers to be called for a given phase.
  +
  +
  +=head2 C<set_handlers>
  +
  +Set a list of handlers to be called for a given phase. Any previously
  +set handlers are forgotten.
   
     $r->set_handlers($hook_name => \&handler);
  -  $r->set_handlers($hook_name => [\&handler, \&handler2]);
  +  $r->set_handlers($hook_name => ['Foo::Bar::handler', \&handler2]);
  +  $r->set_handlers($hook_name => []);
  +  $r->set_handlers($hook_name => undef);
   
   =over 4
   
  @@ -391,10 +402,16 @@
   
   a string representing the phase to handle.
   
  -=item arg3: C<$handlers> (CODE ref or ref to ARRAY of CODE refs)
  +=item arg3: C<$handlers> (CODE ref or SUB name or ref to an ARRAY of CODE refs)
  +
  +a reference to a single handler CODE reference or just a name of the
  +subroutine (fully qualified unless defined in the current package).
   
  -a reference to a list of references to the handler subroutines, or a
  -single reference to a handler subroutine
  +if more than one passed, use a reference to an array of CODE refs
  +and/or subroutine names.
  +
  +if the argument is C<undef> or [] the list of handlers is reset to
  +zero.
   
   =item ret: no return value
   
  @@ -402,11 +419,26 @@
   
   Examples:
   
  +A single handler:
  +
     $r->set_handlers(PerlResponseHandler => \&handler);
  -  $r->set_handlers(PerlResponseHandler => [\&handler, \&handler2]);
   
  -  # XXX: not implemented yet
  -  $r->set_handlers(PerlResponseHandler => sub {...});
  +Multiple handlers:
  +
  +  $r->set_handlers(PerlFixupHandler => ['Foo::Bar::handler', \&handler2]);
  +
  +Anonymous functions:
  +
  +  $r->set_handlers(PerlLogHandler => sub { return Apache::OK });
  +
  +Reset any previously set handlers:
  +
  +  $r->set_handlers(PerlCleanupHandler => []);
  +
  +or
  +
  +  $r->set_handlers(PerlCleanupHandler => undef);
  +
   
   
   
  
  
  

---------------------------------------------------------------------
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