httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Gruno <>
Subject Re: Additional core functions for mod_lua
Date Fri, 03 Aug 2012 15:02:01 GMT
On 08/03/2012 04:51 PM, Igor Galić wrote:

> Right now, is your library meant to be linked with mod_lua
> or does it work with LoadFile?
It's a Lua library, so it doesn't involve httpd per se.
It would be included by mod_lua (or rather, by Lua) by writing the
following in your script:

  local ap = require "aplua"
  function handler(r)
    ap.somestuff(r) -- do some AP stuff here

> If you were planning to integrate it into the httpd project,
> would you as above, or would it become part of mod_lua?
> (From what I gather, it wouldn't make mod_lua more "bloated")
The only "bloat" you'd get is the extra microsecond it will take to
register the functions in Lua. All the functionality is yanked straight
from httpd (which has already loaded apr, pcre etc itself), so there's
no additional memory use by including them. The only "concern", if you
will, is that there will be more functions to document.

> Finally, I'd like to say that all the httpd stuff is probably
> fine, the APR stuff though is a) Not namespaced as apr, and
> might be misplaced. I'm probably not competent enough to comment
> on this one, though.
Yes, we could create a global table, ap, for the ap stuff, and apr for
the apr stuff, or just make a table for apr, and have the rest
registered within the request_rec table.

> I cannot seem to be able to find this stuff…
The other examples I mentioned will be available in the developer docs,
as soon as I've finished making it somewhat organized.

With regards,

View raw message