Diff

util/sasl/anonymous.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 4113:65482a852c4d
child 7215:a81d9a6e288f
line wrap: on
line diff
--- a/util/sasl/anonymous.lua	Mon Aug 10 22:16:05 2015 +0200
+++ b/util/sasl/anonymous.lua	Sat Feb 21 10:36:37 2015 +0100
@@ -16,7 +16,7 @@
 local log = require "util.logger".init("sasl");
 local generate_uuid = require "util.uuid".generate;
 
-module "sasl.anonymous"
+local _ENV = nil;
 
 --=========================
 --SASL ANONYMOUS according to RFC 4505
@@ -39,8 +39,10 @@
 	return "success"
 end
 
-function init(registerMechanism)
+local function init(registerMechanism)
 	registerMechanism("ANONYMOUS", {"anonymous"}, anonymous);
 end
 
-return _M;
+return {
+	init = init;
+}