perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Cory Omand <Cory.Om...@Sun.COM>
Subject Apache2::compat Question
Date Tue, 07 Feb 2006 19:28:01 GMT

I am trying to set up Apache::RPC::Server (RPC-XML-0.58) under MP2 (MP 
2.0.2 + Apache 2.0.55 on Solaris 10 SPARC).  This module was written to 
the MP1 API, therefore I'm loading Apache2::compat as the first 'use' 
statement in my server  However, the module makes use of 
Apache->server, which apparently is not exposed by the compatibility 
module.  Is there any way for me to use Apache::RPC::Server as provided 
by the author (some tweak to provide compatibility), or am I going to 
have to port this module to MP2 to get it to run?

In the event that I have to port, I have an additional question about 
how best to migrate.  The RPC::Server code does the following (essentially):

$R = Apache->server;
$path = $R->location;
$debug = $R->dir_config("RpcDebugLevel");
$Raux = (ref($R) eq 'Apache') ? $R->server : $R;
$host = $Raux->server_hostname;
$port = $Raux->port;

What is the correct way to get the above information using Apache2:: 
objects?  The above code is called during initialization, not as a 
request handler, so I don't have access to a RequestRec.

My assumptions are as follows:

$R = Apache2::ServerUtil->server;
$Q = Apache2::RequestUtil->request; (??? -- no +GlobalRequest)
$path = $Q->location;
$debug = $Q->dir_config->get("RpcDebugLevel");
$Raux = (ref($R) eq 'Apache2::ServerRec')
       ? Apache2::ServerUtil->server : $R;
$host = $Q->server_hostname;
$port = $Q->port;

Any pointers or suggestions are warmly welcomed.

Thanks in advance,


View raw message