Software /
code /
prosody
Diff
core/moduleapi.lua @ 12253:57d35fcde488
modulemanager, moduleapi: Switch to new pluginloader interface
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Fri, 04 Feb 2022 14:11:46 +0000 |
parent | 12095:c1d2bc6603ae |
child | 12479:4d36fbcdd210 |
line wrap: on
line diff
--- a/core/moduleapi.lua Fri Feb 04 14:10:34 2022 +0000 +++ b/core/moduleapi.lua Fri Feb 04 14:11:46 2022 +0000 @@ -10,7 +10,6 @@ local set = require "util.set"; local it = require "util.iterators"; local logger = require "util.logger"; -local pluginloader = require "util.pluginloader"; local timer = require "util.timer"; local resolve_relative_path = require"util.paths".resolve_relative_path; local st = require "util.stanza"; @@ -129,7 +128,8 @@ end function api:require(lib) - local f, n = pluginloader.load_code_ext(self.name, lib, "lib.lua", self.environment); + local modulemanager = require"core.modulemanager"; + local f, n = modulemanager.loader:load_code_ext(self.name, lib, "lib.lua", self.environment); if not f then error("Failed to load plugin library '"..lib.."', error: "..n); end -- FIXME better error message return f(); end