httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian McCallister <bri...@skife.org>
Subject Re: Reducing number of mod_lua hook directives
Date Mon, 10 May 2010 19:25:32 GMT
On Mon, May 10, 2010 at 11:02 AM, Dan Poirier <poirier@pobox.com> wrote:
> mod_lua has 8 separate directives for adding hooks using external files
> with Lua code (LuaHookXxxxx) and 8 more for adding the same hooks using
> inline Lua code (<LuaHookXxxxx>).  Most of the code to implement these
> is common.
>
> I think it'd be easier to understand - and document - the module if we
> cut these down to two directives, with an additional argument to
> indicate which hook is involved.  E.g. change
>
> LuaHookAccessChecker /path/to/script.lua  funcname
> LuaHookAuthChecker   /path/to/script.lua  funcname
> LuaHookCheckUserID   /path/to/script.lua  funcname
> ...
>
> to
>
> LuaHook AccessChecker /path/to/script.lua  funcname
> LuaHook AuthChecker   /path/to/script.lua  funcname
> LuaHook CheckUserID   /path/to/script.lua  funcname

This makes a ton of sense to me.

> ...
>
>
> and
>
> <LuaHookAccessChecker funcname>
> -- lua code
> </LuaHookAccessChecker>
>
> to
>
> <LuaHook AccessChecker funcname>
> -- lua code
> </LuaHook>
>
>
> Thoughts?
>
> Dan
>
>

Mime
View raw message