anchor.diff:      extract_module_hooks(ModName, Rest, [{HookName, ModName, Fun, Arity}|Acc]);
   extract_module_hooks(ModName, [{Fun, Arity}|Rest], Acc) ->
       extract_module_hooks(ModName, Rest, [{Fun, ModName, Fun, Arity}|Acc]).
  -
  -
  -
  -
   
   compile_hooks(CheckedPlugins) ->
       CheckedHooks = extract_hooks(CheckedPlugins),
  
positive.code:         Hooks ->
              extract_hooks(Rest, [extract_module_hooks(Name, Hooks, []) | Acc])
      end;
  extract_hooks([{application, Name, Options}|Rest], Acc) ->
      case proplists:get_value(hooks, Options, []) of
          [] ->
              case application:get_env(Name, vmq_plugin_hooks, []) of
                  [] -> extract_hooks(Rest, Acc);
                  Hooks -> extract_hooks(Rest, [extract_app_env_hooks(Hooks, []) | Acc])
              end;
          Hooks ->
                  extract_hooks(Rest, [extract_app_hooks(Hooks, []) | Acc])
      end.
  
  extract_app_hooks([{Mod, Fun, Arity}|Rest], Acc) ->
      extract_app_hooks(Rest, [{Fun, Mod, Fun, Arity}|Acc]);
  extract_app_hooks([{_,_,_,_}=Hook|Rest], Acc) ->
      extract_app_hooks(Rest, [Hook|Acc]).
  
  extract_app_env_hooks([{Mod, Fun, Arity}|Rest], Acc) ->
      extract_app_env_hooks(Rest, [{Fun, Mod, Fun, Arity}|Acc]).
  
  extract_module_hooks(_, [], Acc) ->
      Acc;
  
negative.code:             {error, Reason}
      end.
  
  extract_hooks(CheckedPlugins) ->
      extract_hooks(CheckedPlugins, []).
  
  