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 2001/04/02 11:00:29 UTC
cvs commit: modperl-2.0/Apache-Test/lib/Apache TestHandler.pm
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;