anchor.diff:  -endif.
   
   -record(state, {
  -          ready=false,
  +          ready :: boolean(),
             deferred_calls=[],
             plugins=[]}).
   
  
positive.code: %%--------------------------------------------------------------------
  init([]) ->
      Plugins = application:get_env(vmq_plugin, plugins, []),
      wait_until_ready(#state{plugins = Plugins}).
  
  %%--------------------------------------------------------------------
  %% @private
  
negative.code:     {ok, RegisteredProcess} = application:get_env(vmq_plugin, wait_for_proc),
      %% we start initializing the plugins as soon as
      %% the registered process is alive
      case erlang:whereis(RegisteredProcess) of
          undefined ->
              Self = self(),
              spawn_link(
                fun() ->
                        init_when_ready(Self, RegisteredProcess)
                end),
              {ok, State};
          _ ->
              {ok, handle_deferred_calls(State#state{ready=true})}
      end;
  wait_until_ready(#state{ready=true} = State) ->
      {ok, handle_deferred_calls(State)}.
  
  