[development] module names and namespaces
drupal at dave-cohen.com
Sat Oct 16 16:34:05 UTC 2010
Hey, I'm wondering what the community thinks about this...
I feel that if I have modules/foo/foo.module checked into drupal.org CVS
and drupal.org/project/foo, then this module stakes a claim to the
foo_... namespace. That is, I can name my functions foo_whatever
without worrying that some other module out there already defines the
same function. Similarly, I can name my variables foo_whatever,
database tables, and so on.
Now, let's say someone else checks in a module called foo_bar. And say
both modules define the same function, variable or other namespace
collision. What then? Is that a bug, and if so which module is
responsible for fixing it?
If you want a concrete example, both fb.module and fb_social.module
define variables starting with "fb_", and specifically I wonder how to
respond to http://drupal.org/node/943462.
I don't want to start a flame war. I'm curious if there is community
consensus or official policy. Personally I think its a bad idea to name
any module with an underscore. That is, drupal.org/project/foo_bar
should instead be drupal.org/project/foobar, as this avoids any
More information about the development