anchor.diff:  
   -module(couch_peruser).
   -behaviour(gen_server).
  --behaviour(config_listener).
   
   -include_lib("couch/include/couch_db.hrl").
   
  
positive.code: -export([start_link/0, init/1, handle_call/3, handle_cast/2, handle_info/2,
           terminate/2, code_change/3]).
  
  % config_listener callbacks
  -export([handle_config_change/5, handle_config_terminate/3]).
  
  -export([init_changes_handler/1, changes_handler/3]).
  
  -record(state, {parent, db_name, delete_dbs, changes_pid, changes_ref}).
  
  
  start_link() ->
  
negative.code: 
  handle_info({'DOWN', Ref, _, _, _Reason}, #state{changes_ref=Ref} = State) ->
      {stop, normal, State};
  handle_info({config_change, "couch_peruser", _, _}, State) ->
      handle_cast(update_config, State);
  handle_info({config_change, "couch_httpd_auth", "authentication_db", _}, State) ->
      handle_cast(update_config, State);
  handle_info({gen_event_EXIT, _Handler, _Reason}, State) ->
      erlang:send_after(?RELISTEN_DELAY, self(), restart_config_listener),
      {noreply, State};
  handle_info({'EXIT', _Pid, _Reason}, State) ->
      erlang:send_after(?RELISTEN_DELAY, self(), restart_config_listener),
      {noreply, State};
  handle_info(restart_config_listener, State) ->
      ok = subscribe_for_changes(),
      {noreply, State};
  handle_info(_Msg, State) ->
      {noreply, State}.
  
  subscribe_for_changes() ->
      config:subscribe_for_changes([
          {"couch_httpd_auth", "authentication_db"},
          "couch_peruser"
      ]).
  
  
  terminate(_Reason, _State) ->
      %% Everything should be linked or monitored, let nature
  