anchor.diff:  %% @doc execute all hooks for the HookName until one return ok or {ok, Val}.
   %% Otherwise it will return all other results as error.
   -spec all_till_ok(HookName::hookname(), Args::list())
  -    -> ok | {ok, any()} | {error, term()}.
  +-> ok | {ok, any()} | {error, term()}.
   all_till_ok(HookName, Args) ->
       case hooks_list:find(HookName) of
           {ok, Hooks} -> all_till_ok1(Hooks, Args, []);
  
positive.code: %% @doc enable a plugin and load paths if needed
  -spec enable_plugin(Application::atom(), Paths::[string()]) -> ok | {error, term()}.
  enable_plugin(Application, Paths)
          when is_atom(Application), is_list(Paths) ->
      gen_server:call(?MODULE, {enable_plugin, Application, Paths}).
  
  %% @doc disable a plugin
  
negative.code: all_test() ->
      {ok, _} = application:ensure_all_started(hooks),
  
      Hooks = [{a, [{?MODULE, hook1, 0},
                    {?MODULE, hook2, 0}]},
               {b, [{?MODULE, hook1, 2},
                    {?MODULE, hook2, 2}]}],
      ok = hooks:mreg(Hooks),
  
      ?assertEqual([[], []], hooks:all(a, [])),
      ?assertEqual([[1 | 1], [1 | 1]], hooks:all(b, [1, 1])),
  