Lazy loading: hook_hook_info is for hook owners only.
Heine Tue, 2013/07/30 - 22:38
I've recently seen some recommendations to use hook_hook_info to provide "groups" to core-provided hooks so you can move your module's implementations of those hooks to $module.$group.inc. A poor-mans autoloader if you will.
Beware that such use is not in accordance with the API documentation which states that hook_hook_info should be implemented by modules declaring new hooks for other modules to implement.
In addition, having two modules on your system declaring a group for the same hook will break all use of $group.inc's for that particular hook. This happens regardless of whether the group is identical or not.To reiterate:
- DON'T use if all you do is implement hooks.
- DO use to declare own hooks that can be used in other modules.
NB: In rare cases, a module could implement hook_hook_info_alter to change a hook group, but this is again pretty hacky, for modules could still opt to have hook implementations in their main .module file.