Software /
code /
prosody
Diff
util/pubsub.lua @ 6777:5de6b93d0190
util.*: Remove use of module() function, make all module functions local and return them in a table at the end
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sat, 21 Feb 2015 10:36:37 +0100 |
parent | 6515:c9a72c64c3e2 |
child | 6791:e813e8cf6046 |
child | 7695:56ce32cfd6d9 |
line wrap: on
line diff
--- a/util/pubsub.lua Mon Aug 10 22:16:05 2015 +0200 +++ b/util/pubsub.lua Sat Feb 21 10:36:37 2015 +0100 @@ -1,8 +1,6 @@ local events = require "util.events"; local t_remove = table.remove; -module("pubsub", package.seeall); - local service = {}; local service_mt = { __index = service }; @@ -15,7 +13,7 @@ ["pubsub#max_items"] = "20"; } }; -function new(config) +local function new(config) config = config or {}; return setmetatable({ config = setmetatable(config, default_config); @@ -442,4 +440,6 @@ return true; end -return _M; +return { + new = new; +};