util/pubsub.lua
changeset 6780 5de6b93d0190
parent 6518 c9a72c64c3e2
child 6794 e813e8cf6046
child 7698 56ce32cfd6d9
--- 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;
+};