You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Shibi NS <sh...@gmail.com> on 2011/01/30 20:27:26 UTC

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

I have a Apache module mod_xyz , is there is anyway i can invoke some
functions defined mod_xyz  from mod_perl ?

-- 
--Shibi Ns--

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

Posted by Torsten Förtsch <to...@gmx.net>.
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