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/Request Request_pm
Date Mon, 09 Feb 2004 21:58:37 GMT
joes        2004/02/09 13:58:37

  Modified:    glue/perl/t/apreq request.t
               glue/perl/t/response/TestApReq inherit.pm request.pm
               glue/perl/xsbuilder apreq_xs_postperl.h
               glue/perl/xsbuilder/Apache/Cookie Cookie_pm
               glue/perl/xsbuilder/Apache/Request Request_pm
  Log:
  Reorganize the use()d packages for perl glue.  Drop Devel::Peek dependence from inherit.t
tests.  Minor whitespace cleanup in apreq_xs_postperl.h.
  
  Revision  Changes    Path
  1.6       +10 -5     httpd-apreq-2/glue/perl/t/apreq/request.t
  
  Index: request.t
  ===================================================================
  RCS file: /home/cvs/httpd-apreq-2/glue/perl/t/apreq/request.t,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- request.t	27 Jun 2003 19:49:57 -0000	1.5
  +++ request.t	9 Feb 2004 21:58:37 -0000	1.6
  @@ -6,7 +6,7 @@
   use Apache::TestUtil;
   use Apache::TestRequest qw(GET_BODY UPLOAD_BODY);
   
  -plan tests => 2;
  +plan tests => 3;
   
   my $location = "/TestApReq__request";
   #print GET_BODY $location;
  @@ -22,8 +22,13 @@
   {
       # upload a string as a file
       my $test  = 'upload';
  -    my $value = 'dataUpload' x 100_000;
  -    ok t_cmp($value,
  -             UPLOAD_BODY("$location?test=$test", content => $value),
  -             "basic upload");
  +    my $value = 'DataUpload' x 100_000;
  +    my $result = UPLOAD_BODY("$location?test=$test", content => $value); 
  +    ok t_cmp($value, $result, "basic upload");
  +    my $i;
  +    for ($i = 0; $i < length $value; ++$i) {
  +        last if substr($value,$i,1) ne substr($result,$i,1);
  +    }
  +
  +    ok t_cmp(length($value), $i, "basic upload length");    
   }
  
  
  
  1.5       +1 -2      httpd-apreq-2/glue/perl/t/response/TestApReq/inherit.pm
  
  Index: inherit.pm
  ===================================================================
  RCS file: /home/cvs/httpd-apreq-2/glue/perl/t/response/TestApReq/inherit.pm,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- inherit.pm	17 Jun 2003 12:47:03 -0000	1.4
  +++ inherit.pm	9 Feb 2004 21:58:37 -0000	1.5
  @@ -6,11 +6,10 @@
   use APR;
   use Apache::RequestRec;
   use Apache::RequestIO;
  -use Devel::Peek;
  +
   sub handler {
       my $r = shift;
       $r = __PACKAGE__->new($r); # tickles refcnt bug in apreq-1
  -    Dump($r);
       die "Wrong package: ", ref $r unless $r->isa('TestApReq::inherit');
       $r->content_type('text/plain');
       my $j = Apache::Cookie->jar($r->env);
  
  
  
  1.6       +0 -2      httpd-apreq-2/glue/perl/t/response/TestApReq/request.pm
  
  Index: request.pm
  ===================================================================
  RCS file: /home/cvs/httpd-apreq-2/glue/perl/t/response/TestApReq/request.pm,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- request.pm	17 Jul 2003 02:59:33 -0000	1.5
  +++ request.pm	9 Feb 2004 21:58:37 -0000	1.6
  @@ -7,8 +7,6 @@
   use Apache::RequestIO;
   use Apache::Request ();
   use Apache::Connection;
  -use APR::Brigade;
  -use APR::Bucket;
   
   sub handler {
       my $r = shift;
  
  
  
  1.20      +5 -5      httpd-apreq-2/glue/perl/xsbuilder/apreq_xs_postperl.h
  
  Index: apreq_xs_postperl.h
  ===================================================================
  RCS file: /home/cvs/httpd-apreq-2/glue/perl/xsbuilder/apreq_xs_postperl.h,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- apreq_xs_postperl.h	18 Oct 2003 05:44:10 -0000	1.19
  +++ apreq_xs_postperl.h	9 Feb 2004 21:58:37 -0000	1.20
  @@ -84,12 +84,12 @@
               MAGIC *mg;
               SV **svp;
           case SVt_PVHV:
  -          if (SvMAGICAL(sv) && (mg = mg_find(sv,PERL_MAGIC_tied))) {
  +            if (SvMAGICAL(sv) && (mg = mg_find(sv,PERL_MAGIC_tied))) {
                  in = mg->mg_obj;
                  break;
  -           }
  -           else if ((svp = hv_fetch((HV *)sv, key, 1, FALSE)) ||
  -                    (svp = hv_fetch((HV *)sv, altkey, 2, FALSE)))
  +            }
  +            else if ((svp = hv_fetch((HV *)sv, key, 1, FALSE)) ||
  +                     (svp = hv_fetch((HV *)sv, altkey, 2, FALSE)))
               {
                   in = *svp;
                   break;
  @@ -215,7 +215,7 @@
   }
   
   
  -/** requires type##2sv macro */
  +/** requires apreq_##type (type is either request or jar) */
   
   #define APREQ_XS_DEFINE_OBJECT(type)                                    \
   static XS(apreq_xs_##type)                                              \
  
  
  
  1.12      +2 -3      httpd-apreq-2/glue/perl/xsbuilder/Apache/Cookie/Cookie_pm
  
  Index: Cookie_pm
  ===================================================================
  RCS file: /home/cvs/httpd-apreq-2/glue/perl/xsbuilder/Apache/Cookie/Cookie_pm,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- Cookie_pm	12 Nov 2003 19:29:36 -0000	1.11
  +++ Cookie_pm	9 Feb 2004 21:58:37 -0000	1.12
  @@ -1,6 +1,6 @@
   use strict;
   use warnings FATAL => 'all';
  -use Apache2;
  +
   use APR;
   use APR::Table;
   
  @@ -8,8 +8,7 @@
   push our(@ISA), __PACKAGE__ -> env;
   
   package Apache::Cookie::Table;
  -use base 'APR::Table';
  -
  +push our(@ISA), 'APR::Table';
   
   package Apache::Cookie;
   
  
  
  
  1.8       +5 -3      httpd-apreq-2/glue/perl/xsbuilder/Apache/Request/Request_pm
  
  Index: Request_pm
  ===================================================================
  RCS file: /home/cvs/httpd-apreq-2/glue/perl/xsbuilder/Apache/Request/Request_pm,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- Request_pm	29 Jun 2003 03:41:17 -0000	1.7
  +++ Request_pm	9 Feb 2004 21:58:37 -0000	1.8
  @@ -1,14 +1,16 @@
   use strict;
   use warnings FATAL => 'all';
  -use Apache2;
  +
   use APR;
   use APR::Table;
  +use APR::Bucket;
  +use APR::Brigade;
   
   package Apache::Upload::Table;
  -use base 'APR::Table';
  +push our(@ISA), 'APR::Table';
   
   package Apache::Request::Table;
  -use base 'APR::Table';
  +push our(@ISA), 'APR::Table';
   
   package Apache::Request;
   push our(@ISA), __PACKAGE__ -> env;
  
  
  

Mime
View raw message