Apache::Test hooks?
am 09.03.2010 10:12:36 von torsten.foertschHi,
for my current project I need an additional server process to run to run my=
=20
tests. What I came up with is this (snippet from t/TEST.PL):
use Apache::TestTrace;
use Apache::TestServer ();
BEGIN {
no warnings 'redefine';
my $orig_start=3D\&Apache::TestServer::start;
*Apache::TestServer::start=3Dsub {
my $rc=3D$orig_start->(@_);
if( $rc ) {
notice "Starting sessionserver";
}
return $rc;
};
my $orig_stop=3D\&Apache::TestServer::stop;
*Apache::TestServer::stop=3Dsub {
my $rc=3D$orig_stop->(@_);
if( $rc!=3D-1 ) {
notice "Stopping sessionserver";
}
return $rc;
};
}
Is that the right way to go?
Torsten Förtsch
=2D-=20
Need professional modperl support? Hire me! (http://foertsch.name)
Like fantasy? http://kabatinte.net