httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian McCallister <>
Subject Re: Reducing number of mod_lua hook directives
Date Wed, 12 May 2010 15:12:58 GMT
On Tue, May 11, 2010 at 8:47 PM, William A. Rowe Jr.
<> wrote:
> On 5/11/2010 9:47 AM, Dan Poirier wrote:
>>> LuaHook AccessChecker funcname /path/to/script.lua
>> I just thought of a problem - right now, the funcname is optional
>> (defaults to "handle").  I hate having optional arguments that don't
>> come at the end.  I'd just as soon make it a required argument, but if
>> people would rather it stay optional, then I'd rather leave it at the
>> end.   What do folks prefer?
> I don't think this really violates the principal of adding optargs at the
> end of the directive.  func names and paths appear sufficiently different.

The look different, yes, but not enough imho. Convention says your lua
files end in .lua, etc, but that is convention. While I don't feel
like being in the business of preventing fools from shooting
themselves in the foot, inspecting contents of a string to determine
if it is a function name or a path is pretty grody compared to
requiring the function name.

Requiring the function name reduces the "things you just have to know"
so I actually rather like it, the more I think about it.


View raw message