Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: ModPerl: ModPerl

Apache::Test hooks?

 

 

ModPerl modperl RSS feed   Index | Next | Previous | View Threaded


torsten.foertsch at gmx

Mar 9, 2010, 1:12 AM

Post #1 of 1 (437 views)
Permalink
Apache::Test hooks?

Hi,

for my current project I need an additional server process to run to run my
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=\&Apache::TestServer::start;
*Apache::TestServer::start=sub {
my $rc=$orig_start->(@_);
if( $rc ) {
notice "Starting sessionserver";
}
return $rc;
};

my $orig_stop=\&Apache::TestServer::stop;
*Apache::TestServer::stop=sub {
my $rc=$orig_stop->(@_);
if( $rc!=-1 ) {
notice "Stopping sessionserver";
}
return $rc;
};
}

Is that the right way to go?

Torsten Förtsch

--
Need professional modperl support? Hire me! (http://foertsch.name)

Like fantasy? http://kabatinte.net

ModPerl modperl RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.