diff options
author | Ted Trask <ttrask01@yahoo.com> | 2013-10-18 22:29:04 +0000 |
---|---|---|
committer | Ted Trask <ttrask01@yahoo.com> | 2013-10-18 22:29:04 +0000 |
commit | 6e6c8803a11dc23f2dfc5cced35b54981395fa9c (patch) | |
tree | 182cba17869721d350138ed5d7f5cd12a00b8046 /dnsmasq-controller.lua | |
parent | 3cdbb88e20095542f951d580581df5b53960240d (diff) | |
download | acf-dnsmasq-6e6c8803a11dc23f2dfc5cced35b54981395fa9c.tar.bz2 acf-dnsmasq-6e6c8803a11dc23f2dfc5cced35b54981395fa9c.tar.xz |
Remove all calls to 'module' in preparation for move to Lua 5.2
Use mymodule parameter for module definition.
This was also helpful in revealing places where the code relied on the global environment.
Diffstat (limited to 'dnsmasq-controller.lua')
-rw-r--r-- | dnsmasq-controller.lua | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/dnsmasq-controller.lua b/dnsmasq-controller.lua index 5ba412b..22fe912 100644 --- a/dnsmasq-controller.lua +++ b/dnsmasq-controller.lua @@ -1,24 +1,25 @@ -module(..., package.seeall) +local mymodule = {} -default_action = "status" +mymodule.default_action = "status" -function status(self) +function mymodule.status(self) return self.model.getstatus() end -function startstop(self) +function mymodule.startstop(self) return self.handle_form(self, self.model.get_startstop, self.model.startstop_service, self.clientdata) end -function config(self) +function mymodule.config(self) return self.handle_form(self, self.model.getconfig, self.model.setconfig, self.clientdata, "Save", "Edit Config", "Configuration Set") end -function expert(self) +function mymodule.expert(self) return self.handle_form(self, self.model.getconfigfile, self.model.setconfigfile, self.clientdata, "Save", "Edit Config File", "Configuration File Set") end -function viewleases(self) +function mymodule.viewleases(self) return self.model.getleases() end +return mymodule |