perl-modperl-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From do...@apache.org
Subject cvs commit: modperl-2.0/Apache-Test/lib/Apache TestHandler.pm
Date Mon, 02 Apr 2001 09:00:29 GMT
dougm       01/04/02 02:00:29

  Added:       Apache-Test/lib/Apache TestHandler.pm
  Log:
  Perl*Handler utilities
  
  Revision  Changes    Path
  1.1                  modperl-2.0/Apache-Test/lib/Apache/TestHandler.pm
  
  Index: TestHandler.pm
  ===================================================================
  package Apache::TestHandler;
  
  use Apache::Test ();
  
  #some utility handlers for testing hooks other than response
  #see modperl-2.0/t/hooks/TestHooks/authen.pm
  
  #compat with 1.xx
  my $send_http_header = Apache->can('send_http_header') || sub {};
  my $print = Apache->can('print') || Apache::RequestRec->can('puts');
  
  sub ok {
      my $r = shift;
      $r->$send_http_header;
      $r->content_type('text/plain');
      $r->$print("ok");
      0;
  }
  
  sub ok1 {
      my $r = shift;
      Apache::Test::plan($r, tests => 1);
      Apache::Test::ok(1);
      0;
  }
  
  1;
  
  
  

Mime
View raw message