util/import.lua@5d861d6e5bbd
util/import.lua
Sat, 15 Nov 2008 22:30:09 +0100
- author
- Tobias Markmann <tm@ayena.de>
- date
- Sat, 15 Nov 2008 22:30:09 +0100
- changeset 294
- 5d861d6e5bbd
- parent 49
-
1cd2a8db392d
- child 519
-
cccd610a0ef9
- permissions
- -rw-r--r--
Made SASL module fit the new interface.
local t_insert = table.insert;
function import(module, ...)
local m = package.loaded[module] or require(module);
if type(m) == "table" and ... then
local ret = {};
for _, f in ipairs{...} do
t_insert(ret, m[f]);
end
return unpack(ret);
end
return m;
end