Software / code / prosody
Comparison
core/modulemanager.lua @ 6415:010b141e91ed
core.modulemanager, core.moduleapi: Hack around dependency loop
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Wed, 17 Sep 2014 14:48:49 +0200 |
| parent | 6367:769a3577dd85 |
| child | 6422:6d4d87a89026 |
comparison
equal
deleted
inserted
replaced
| 6414:31c15004bfb0 | 6415:010b141e91ed |
|---|---|
| 35 -- We need this to let modules access the real global namespace | 35 -- We need this to let modules access the real global namespace |
| 36 local _G = _G; | 36 local _G = _G; |
| 37 | 37 |
| 38 module "modulemanager" | 38 module "modulemanager" |
| 39 | 39 |
| 40 local api = _G.require "core.moduleapi"; -- Module API container | 40 local api = _G.require "core.moduleapi"(_M); -- Module API container |
| 41 | 41 |
| 42 -- [host] = { [module] = module_env } | 42 -- [host] = { [module] = module_env } |
| 43 local modulemap = { ["*"] = {} }; | 43 local modulemap = { ["*"] = {} }; |
| 44 | 44 |
| 45 -- Load modules when a host is activated | 45 -- Load modules when a host is activated |