stas        01/12/13 20:52:46

  Modified:    todo     api.txt
               lib/Apache compat.pm
               t/apache compat.t
               t/response/TestApache compat.pm
  Log:
  - Apache->gensym now lives in compat.pm
  
  Revision  Changes    Path
  1.17      +0 -3      modperl-2.0/todo/api.txt
  
  Index: api.txt
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/todo/api.txt,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- api.txt   2001/11/13 17:42:49     1.16
  +++ api.txt   2001/12/14 04:52:45     1.17
  @@ -90,9 +90,6 @@
   $r->cgi_header_out:
   anything in 1.x land actually using it?
   
  -Apache->gensym:
  ->> Apache::compat ?
  -
   $r->post_connection:
   alias not implemented
   
  
  
  
  1.31      +5 -0      modperl-2.0/lib/Apache/compat.pm
  
  Index: compat.pm
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/lib/Apache/compat.pm,v
  retrieving revision 1.30
  retrieving revision 1.31
  diff -u -r1.30 -r1.31
  --- compat.pm 2001/12/10 08:28:22     1.30
  +++ compat.pm 2001/12/14 04:52:45     1.31
  @@ -26,6 +26,7 @@
   use APR::Table ();
   use APR::Pool ();
   use mod_perl ();
  +use Symbol ();
   
   BEGIN {
       $INC{'Apache.pm'} = __FILE__;
  @@ -64,6 +65,10 @@
   sub module {
       require Apache::Module;
       return Apache::Module::loaded($_[1]);
  +}
  +
  +sub gensym {
  +    return Symbol::gensym();
   }
   
   package Apache::Constants;
  
  
  
  1.8       +8 -1      modperl-2.0/t/apache/compat.t
  
  Index: compat.t
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/t/apache/compat.t,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- compat.t  2001/12/10 04:32:40     1.7
  +++ compat.t  2001/12/14 04:52:45     1.8
  @@ -6,7 +6,7 @@
   use Apache::TestUtil;
   use Apache::TestRequest;
   
  -plan tests => 30, todo => [24, 27, 29], \&have_lwp;
  +plan tests => 31, todo => [25, 28, 30], \&have_lwp;
   
   my $location = "/TestApache::compat";
   
  @@ -38,6 +38,13 @@
           GET_BODY(query(@data)),
           q{$r->Apache::args}
           );
  +}
  +
  +# Apache->gensym
  +{
  +    my @data = (test => 'gensym');
  +    my $data = GET_BODY query(@data) || '';
  +    ok_nok($data);
   }
   
   # header_in
  
  
  
  1.8       +6 -1      modperl-2.0/t/response/TestApache/compat.pm
  
  Index: compat.pm
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/t/response/TestApache/compat.pm,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- compat.pm 2001/12/10 08:31:15     1.7
  +++ compat.pm 2001/12/14 04:52:45     1.8
  @@ -14,6 +14,7 @@
   
   sub handler {
       my $r = shift;
  +    $gr = $r;
   
       $r->send_http_header('text/plain');
   
  @@ -33,6 +34,11 @@
       if ($data{test} eq 'content' || $data{test} eq 'args') {
           $r->print("test $data{test}");
       }
  +    elsif ($data{test} eq 'gensym') {
  +        debug "Apache->gensym";
  +        my $fh = Apache->gensym;
  +        ok ref $fh eq 'GLOB';
  +    }
       elsif ($data{test} eq 'header') {
           my $way      = $data{way};
           my $sub      = "header_$way";
  @@ -78,7 +84,6 @@
           }
       }
       elsif ($data{test} eq 'Apache::File') {
  -        $gr = $r;
           my $file = $vars->{t_conf_file};
   
           debug "new Apache::File file object";
  
  
  


Reply via email to