docs: function defineModule() {
  
      /* Object based definition */
      if ((arguments.length == 1)
        && arguments[0].name
        && arguments[0].constructor) {
          var module = arguments[0];
          return defineModule(module.name,
                              module.dependencies || [], //optional
                              module.constructor);
      }
  
      /* Normal arguments-based definition */
      var args = normalize(arguments);
  
      /* Our variables */
      var name;
      var dependencies = [];
      var constructor;
  
      /* Name and dependencies */
      if (!args.arguments.length) {
        throw new EsquireError("No module name specified");
      } else {
        name = globalName(args.arguments.splice(0, 1)[0]);
        dependencies = args.arguments;
      }
  
      /* Watch out for double definitions */
      if (modules[name]) {
        throw new EsquireError("Module '" + name + "' already defined");
      }
  
      /* Constructor function */
      if (!args.function) {
        throw new EsquireError("No constructor function specified for module '" + name + "'");
      } else {
        constructor = args.function;
      }
  
      /* Create and remember our new module */
      var module = modules[name] = new Module(name, dependencies, constructor);
  
      /* Notify all "define" listeners */
      for (var i in listeners['define']) {
        try {
          listeners['define'][i](module);
        } catch (error) {
          console.error("Error notifying listener", error);
        }
      }
  
      /* Resolve our deferred if someone was waiting for this */
      if (deferredModules[module.name]) {
        deferredModules[module.name].resolve(module);
        delete deferredModules[module.name];
      }
  
      /* Return our defined module */
      return module;
    }