You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl-cvs@perl.apache.org by do...@apache.org on 2002/06/03 20:27:04 UTC

cvs commit: modperl-2.0/t/response/TestApache compat2.pm

dougm       2002/06/03 11:27:03

  Modified:    lib/Apache compat.pm
               t/response/TestApache compat2.pm
  Log:
  add $r->is_main compat method
  
  Revision  Changes    Path
  1.59      +2 -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.58
  retrieving revision 1.59
  diff -u -r1.58 -r1.59
  --- compat.pm	3 Jun 2002 18:23:16 -0000	1.58
  +++ compat.pm	3 Jun 2002 18:27:03 -0000	1.59
  @@ -321,6 +321,8 @@
       $r->send_fd_length($fh, -1);
   }
   
  +sub is_main { !shift->main }
  +
   package Apache::File;
   
   use Fcntl ();
  
  
  
  1.15      +4 -1      modperl-2.0/t/response/TestApache/compat2.pm
  
  Index: compat2.pm
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/t/response/TestApache/compat2.pm,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- compat2.pm	30 May 2002 04:05:06 -0000	1.14
  +++ compat2.pm	3 Jun 2002 18:27:03 -0000	1.15
  @@ -24,7 +24,7 @@
   sub handler {
       my $r = shift;
   
  -    plan $r, tests => 45;
  +    plan $r, tests => 46;
   
       $r->send_http_header('text/plain');
   
  @@ -230,6 +230,9 @@
       my $t_class = ref $t;
   
       ok t_cmp('APR::Table', $t_class, "Apache::Table->new");
  +
  +    ok t_cmp(!$r->main, $r->is_main,
  +             '$r->is_main');
   
       #note these are not actually part of the tests
       #since i think on platforms where crypt is not supported,