anchor.diff:          _ -> nop
       end.
   
  +get_wm_option(OptName, {WMOptions, OtherOptions}) ->
  +    {Value, UpdOtherOptions} =
  +        handle_get_option_result(get_option(OptName, OtherOptions), OptName),
  +    {[{OptName, Value} | WMOptions], UpdOtherOptions}.
   
  +handle_get_option_result({undefined, Options}, Name) ->
  +    {proplists:get_value(Name, ?WM_OPTION_DEFAULTS), Options};
  +handle_get_option_result(GetOptRes, _) ->
  +    GetOptRes.
  +
  +get_wm_options(Options) ->
  +    {DispatchList, Options1} = get_option(dispatch, Options),
  +    {Name, Options2} = get_option(dispatch, Options1),
  +    {WMOptions, RestOptions} = lists:foldl(fun get_wm_option/2, {[], Options2}, ?WM_OPTIONS),
  +    {DispatchList, Name, WMOptions, RestOptions}.
   
   get_option(Option, Options) ->
       case lists:keytake(Option, 1, Options) of
          false -> {undefined, Options};
          {value, {Option, Value}, NewOptions} -> {Value, NewOptions}
       end.
  +
  +application_set_unless_env_or_undef(_Var, undefined) ->
  +    ok;
  +application_set_unless_env_or_undef(Var, Value) ->
  +    application_set_unless_env(webmachine, Var, Value).
   
   application_set_unless_env(App, Var, Value) ->
       Current = application:get_all_env(App),
  
positive.code: -author('Andy Gross <andy@basho.com>').
  -export([start/1, stop/0, loop/1]).
  
  start(Options) ->
      {DispatchList, Options1} = get_option(dispatch, Options),
      {ErrorHandler0, Options2} = get_option(error_handler, Options1),
      {RewriteModule, Options3} = get_option(rewrite_module, Options2),
      %% The `log_dir' option is deprecated, but remove it from the
      %% options list if it is present
      {_, Options4} = get_option(log_dir, Options3),
      ErrorHandler =
          case ErrorHandler0 of
              undefined ->
                  webmachine_error_handler;
              EH -> EH
          end,
      {PName, Options5} = case get_option(name, Options4) of
        {undefined, _} -> {?MODULE, Options4};
        {PN, O6} -> {PN, O6}
      end,
      webmachine_router:init_routes(DispatchList),
      application_set_unless_env(webmachine, error_handler, ErrorHandler),
      case RewriteModule of
          undefined ->
              %% webmachine:new_request/2 will explode if
              %% application:get_env returns {ok, undefined}
              ok;
          _ ->
              application_set_unless_env(
                webmachine, rewrite_module, RewriteModule)
      end,
      mochiweb_http:start([{name, PName}, {loop, fun loop/1} | Options5]).
  
  stop() ->
      {registered_name, PName} = process_info(self(), registered_name),
  
negative.code:             XReq1 = {webmachine_request,RS1},
              try
                  {ok, Resource} = BootstrapResource:wrap(Mod, ModOpts),
                  {ok,RS2} = XReq1:set_metadata('resource_module',
                                                resource_module(Mod, ModOpts)),
                  webmachine_decision_core:handle_request(Resource, RS2)
              catch
                  error:Error ->
  