[development] Module naming conventions (was Re: Naming the CVSabstraction module)

Larry Garfield larry at garfieldtech.com
Mon Jun 11 18:36:24 UTC 2007

On Sun, 10 Jun 2007 22:13:04 -0400, Moshe Weitzman <weitzman at tejasa.com> wrote:
>> I ran into this issue in the context of "which file do we need to include
> so
>> that this function becomes available".  The file was module-dependent. 
> The
>> function then did not exist yet, so module_implements() and
> function_exists()
>> won't work.
> many keep saying that, but there is an easy fix. just use
> module_invoke('og', 'vocab') if thats what is meant. then module_invoke
> can do the needed includes. module invoke makes explicit the module that
> owns the function.

That again assumes that the code running that line knows which part of the function is the module and which isn't.  If you are given the string:


Is that the foo module, function bar_baz_ugh_agh?  Or the foo_bar_baz module function ug_agh?  Or foo_bar_baz_ugh module function agh?  That cannot be determined without a guess-and-check method.  That's precisely why I didn't go that route for the menu-split patch.

--Larry Garfield

More information about the development mailing list