Update the cache for global names in `modname` module

        `modname` is the name of a module.
763618
def update_module(self, modname, underlined=None):
        
        try:
            pymodule = self.project.get_module(modname)
            self._add_names(pymodule, modname, underlined)
        except exceptions.ModuleNotFoundError:
            pass
438342
def clear_globals_reload_modules(self):
        """"""

        self.code_array.clear_globals()
        self.code_array.reload_modules()

        # Clear result cache
        self.code_array.result_cache.clear()
677839
function set(key, module, global) {
		var m = null;
		var isGlobal = global && typeof global !== 'undefined';

		// check to make sure the module has been assigned only once
		if (isGlobal) {
			if (global.hasOwnProperty(key)) {
				throw '[define-shim] Module ' + key + ' already exists';
			}
		}
		else if (_map.hasOwnProperty(key)) {
			throw '[define-shim] Module ' + key + ' already exists';
			return;
		}

		// construct the module if needed
		if (typeof module === 'function') m = module(get);
		else m = module;

		// assign the module to whichever object is preferred
		if (isGlobal) global[key] = m;
		else _map[key] = m;
	}
1144544
def _setattr_wrapper(mod, key, value):
    
    setattr(mod, key, value)
    if mod == _thismodule:
        setattr(_sys.modules[__name__], key, value)
352428
def cmd_reload_global(self, plname):
        
        gpmon = self.fv.gpmon
        p_info = gpmon.get_plugin_info(plname)
        gpmon.stop_plugin(p_info)
        self.fv.update_pending(0.5)
        self.fv.mm.load_module(plname)
        gpmon.reload_plugin(plname)
        self.fv.start_global_plugin(plname)
        return True
222428
def load_from_name(module_name):
    
    global _CONFIG_CACHE
    if module_name not in _CONFIG_CACHE:
        settings = OrderedDict()
        if isinstance(module_name, six.string_types):
            settings = _load_from_module(_import_module(module_name))
        _CONFIG_CACHE[module_name] = settings
    return _CONFIG_CACHE[module_name]
1123005
def update_pipe_module():
    """"""
    module_dir = __all__
    operators = stream.__dict__
    for key, value in operators.items():
        if getattr(value, 'pipe', None):
            globals()[key] = value.pipe
            if key not in module_dir:
                module_dir.append(key)
704021
def _set_persistent_module(mod):
    '''
    
    '''
    if not mod or mod in mod_list(True) or mod not in \
            available():
        return set()
    __salt__['file.append'](_LOADER_CONF, _LOAD_MODULE.format(mod))
    return set([mod])
879662
function (moduleName, refName) {
            if (moduleName) {
                var moduleNames = Utils.unalias(Utils.normalizeModNamesWithAlias([moduleName], refName));
                Utils.attachModsRecursively(moduleNames);
                return Utils.getModules(moduleNames)[1];
            }
        }
985954
def save(self, *module_names):
        """"""
        for modname in module_names:
            self._saved[modname] = sys.modules.get(modname, None)
969176
def mark_rewrite(self, *names):
        
        already_imported = set(names).intersection(set(sys.modules))
        if already_imported:
            for name in already_imported:
                if name not in self._rewritten_names:
                    self._warn_already_imported(name)
        self._must_rewrite.update(names)
24535
function (modNames, refModName) {
            var ret = [], i, l;
            if (modNames) {
                // 1. index map
                for (i = 0, l = modNames.length; i < l; i++) {
                    // conditional loader
                    // requires:[window.localStorage?"local-storage":""]
                    if (modNames[i]) {
                        ret.push(pluginAlias(addIndexAndRemoveJsExt(modNames[i])));
                    }
                }
            }
            // 2. relative to absolute (optional)
            if (refModName) {
                ret = Utils.normalDepModuleName(refModName, ret);
            }
            return ret;
        }
265940
function reload(moduleName) {
    var id = require.resolve(moduleName);
    var mod = require.cache[id];
    if (mod) {
        var base = path.dirname(mod.filename);
        // expunge each module cache entry beneath this folder
        var stack = [mod];
        while (stack.length) {
            var mod = stack.pop();
            if (beneathBase(mod.filename)) {
                delete require.cache[mod.id];
            }
            stack.push.apply(stack, mod.children);
        }
    }

    // expunge each path cache entry beneath the folder
    for (var cacheKey in module.constructor._pathCache) {
        if (cacheKey.indexOf(moduleName) > 0 && beneathBase(cacheKey)) {
            delete module.constructor._pathCache[cacheKey];
        }
    }

    // re-require the module
    return require(moduleName);

    function beneathBase(file) {
        return base === undefined
            || (file.length > base.length
                && file.substr(0, base.length + 1) === base + path.sep);
    }
}
407535
public void addModuleToExport(final String moduleName) {

        if (m_modulesToExport == null) {
            m_modulesToExport = new HashSet<String>();
        }
        m_modulesToExport.add(moduleName);
    }
84553
def refactor_rename_current_module(self, new_name):
        """"""
        refactor = Rename(self.project, self.resource, None)
        return self._get_changes(refactor, new_name)
186190
public function set(Mod $mod): void
    {
        $this->loadMods();
        $this->mods[$mod->getName()] = $mod;
    }
302367
def isModule(self, dotted_name, extrapath=None):
        """"""
        try:
            return self._module_cache[(dotted_name, extrapath)]
        except KeyError:
            pass
        if dotted_name in sys.modules or dotted_name in self.builtin_modules:
            return dotted_name
        filename = dotted_name.replace('.', os.path.sep)
        if extrapath:
            for ext in self._exts:
                candidate = os.path.join(extrapath, filename) + ext
                if os.path.exists(candidate):
                    modname = self.filenameToModname(candidate)
                    self._module_cache[(dotted_name, extrapath)] = modname
                    return modname
        try:
            return self._module_cache[(dotted_name, None)]
        except KeyError:
            pass
        for dir in self.path:
            if os.path.isfile(dir):
                if dir.endswith('.egg-info'):
                    # distribute creates a setuptools-blah-blah.egg-info
                    # that ends up in sys.path
                    continue
                try:
                    zf = zipfile.ZipFile(dir)
                except zipfile.BadZipfile:
                    self.warn(dir, "%s: not a directory or zip file", dir)
                    continue
                names = zf.namelist()
                for ext in self._exts:
                    candidate = filename + ext
                    if candidate in names:
                        modname = filename.replace(os.path.sep, '.')
                        self._module_cache[(dotted_name, extrapath)] = modname
                        self._module_cache[(dotted_name, None)] = modname
                        return modname
            else:
                for ext in self._exts:
                    candidate = os.path.join(dir, filename) + ext
                    if os.path.exists(candidate):
                        modname = self.filenameToModname(candidate)
                        self._module_cache[(dotted_name, extrapath)] = modname
                        self._module_cache[(dotted_name, None)] = modname
                        return modname
        return None