Re: Is it possible to invoke third party Apache module functions from mod_perl

Torsten Förtsch <[email protected]>
Newsgroups gmane.comp.apache.mod-perl
Message-ID <[email protected]>
On Sunday, January 30, 2011 20:27:26 Shibi NS wrote:
> I have a Apache module mod_xyz , is there is anyway i can invoke some
> functions defined mod_xyz  from mod_perl ?

it depends.

Apache2::ModSSL calls for example a few functions from mod_ssl. Problem is a 
module can be loaded but can also be omitted by the admin. Apache has an 
optional function interface to import functions from another module. The 
following is part of ModSSL.xs. It imports mod_ssl's ssl_is_https() etc.

static void
retrieve_functions(void)
{
  if( is_initialized ) return;
  is_initialized++;
  is_https=APR_RETRIEVE_OPTIONAL_FN(ssl_is_https);
  lookup=APR_RETRIEVE_OPTIONAL_FN(ssl_var_lookup);
  ext_lookup=APR_RETRIEVE_OPTIONAL_FN(ssl_ext_lookup);
}

On the other hand, maybe you have something else in mind, something higher 
level?

Torsten Förtsch

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

Like fantasy? http://kabatinte.net
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.