httpd-apreq-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j...@apache.org
Subject cvs commit: httpd-apreq-2/glue/perl/xsbuilder/Apache/Upload Upload_pm
Date Fri, 23 Jul 2004 05:55:09 GMT
joes        2004/07/22 22:55:09

  Modified:    glue/perl/xsbuilder/Apache/Upload Upload_pm
  Log:
  Bless upload->io() into Apache::Upload::IO class and supply an AUTOLOAD sub to convert
method calls into Apache::Upload::Brigade TIEHANDLE methods
  
  Revision  Changes    Path
  1.11      +7 -1      httpd-apreq-2/glue/perl/xsbuilder/Apache/Upload/Upload_pm
  
  Index: Upload_pm
  ===================================================================
  RCS file: /home/cvs/httpd-apreq-2/glue/perl/xsbuilder/Apache/Upload/Upload_pm,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- Upload_pm	8 Jul 2004 19:55:57 -0000	1.10
  +++ Upload_pm	23 Jul 2004 05:55:09 -0000	1.11
  @@ -9,7 +9,7 @@
   
   sub io {
       tie local (*FH), "Apache::Upload::Brigade", shift->bb;
  -    return *FH{IO};
  +    return bless *FH{IO}, "Apache::Upload::IO";
   }
   
   sub fh {
  @@ -36,3 +36,9 @@
   
   package Apache::Upload::Brigade;
   push our(@ISA), "APR::Brigade";
  +
  +package Apache::Upload::IO;
  +sub AUTOLOAD {
  +    s/.*:://, tr/a-z/A-Z/ for our $AUTOLOAD;
  +    tied(*{shift()})->$AUTOLOAD(@_);
  +}
  
  
  

Mime
View raw message