[drupal-devel] Why is there no designation between hooks and
private functions in a module?
carl_mcdade at yahoo.com
Tue Mar 15 08:37:19 UTC 2005
Yes, I noticed this and at first thought it was a rule. It would be nice
if it was an enforced convention. Even better if it was an advertised
(handbook page) coding convention. This would be a good start.
I have tried doing a search and replace on just the 4.6 core. Then I ran
20 patches. Diff/Patch is not perfect, out of the 20 patches I got only
11 working without error :( I have no idea why this is, I am using
WindowsXP and cygwin to do the work. Some of the code just refuses to
merge correctly or the patch is not created correctly. It problably
takes some fuzzy controls that I am not familiar with.
I first noticed something like this happening while working on the
firefox theme. This is why I am sceptical about using diff patch to do
something major like this.
Kristjan Jansen wrote:
> many modules in Drupal tend to name their private functions (eg
> non-hooks) as
> function _mymodule_functionname()
> Maybe enforce such a convention?
> This does not need that huge patches inside core (but there are still
> many direct non-hook function calls from module to module)
More information about the drupal-devel