[development] module_exists vs. functions_exists?

Aaron Winborn winborn at advomatic.com
Wed Jun 25 16:01:59 UTC 2008

Doesn't work in many cases. I frequently build modules with optional 
dependencies. Even with your set up, we're assuming a module's api stays 
the same within a core version, which is frequently not true.

There's no easy answer for the first case, other than bloating your code 
with additional drupal_function_exists checks, and the second would 
require tracking module version (at least its major version).

Earnie Boyd wrote:
> Quoting Aaron Winborn <winborn at advomatic.com>:
>> at least document a best practice.
> mymod.info
>  dependencies = urmod
> mymod.module
>  $mymod_bar = urmod_foo();
> Earnie -- http://for-my-kids.com/
> -- http://give-me-an-offer.com/

More information about the development mailing list