joes        2004/07/07 17:33:53

  Modified:    glue/perl/xsbuilder/Apache/Request Request_pod
  Log:
  Update docs to reflect fact that UPLOAD_HOOK and HOOK_DATA are fully 
back-compat.  DISABLE_UPLOADS is already implemented also.
  
  Revision  Changes    Path
  1.17      +12 -14    
httpd-apreq-2/glue/perl/xsbuilder/Apache/Request/Request_pod
  
  Index: Request_pod
  ===================================================================
  RCS file: 
/home/cvs/httpd-apreq-2/glue/perl/xsbuilder/Apache/Request/Request_pod,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- Request_pod       29 Jun 2004 18:34:48 -0000      1.16
  +++ Request_pod       8 Jul 2004 00:33:53 -0000       1.17
  @@ -48,7 +48,7 @@
   
   Limit the size of POST data (in bytes).
   
  -=item C<DISABLE_UPLOADS> [TODO]
  +=item C<DISABLE_UPLOADS>
   
   Disable file uploads.
   
  @@ -65,27 +65,27 @@
   
   For more details on C<link>, see the L<Apache:Upload> manpage.
   
  -=item C<HOOK_DATA> (requires C<Apache::Upload>)
  +=item C<HOOK_DATA>
   
   Extra configuration info passed to an upload hook.
   See the description for the next item, C<UPLOAD_HOOK>.
   
  -=item C<UPLOAD_HOOK> (requires C<Apache::Upload>)
  +=item C<UPLOAD_HOOK>
   
   Sets up a callback to run whenever file upload data is read. This
   can be used to provide an upload progress meter during file uploads.
   Apache will automatically continue writing the original data to
   $upload->fh after the hook exits.
   
  - my $transparent_hook = sub {
  -   my ($upload, $data, $hook_data) = @_;
  -   warn "$hook_data: got $len bytes for " . $upload->name;
  - };
  -
  - my $apr = Apache::Request->new($r, 
  -                                HOOK_DATA => "Note",
  -                                UPLOAD_HOOK => $transparent_hook,
  -                               );
  +  my $transparent_hook = sub {
  +    my ($upload, $data, $data_len, $hook_data) = @_;
  +    warn "$hook_data: got $data_len bytes for " . $upload->name;
  +  };
  +
  +  my $req = Apache::Request->new($r, 
  +                                 HOOK_DATA => "Note",
  +                                 UPLOAD_HOOK => $transparent_hook,
  +                                );
   
   =back
   
  @@ -220,8 +220,6 @@
   =item C<instance> is now identical to C<new>.
   
   =item C<param> includes the functionality of C<parms> and C<params>.
  -
  -=item The argument list for the upload hook has changed
   
   =back
   
  
  
  

Reply via email to