diff options
author | Ted Trask <ttrask01@yahoo.com> | 2013-10-20 01:06:44 +0000 |
---|---|---|
committer | Ted Trask <ttrask01@yahoo.com> | 2013-10-20 01:06:44 +0000 |
commit | 8b49a54dfe53bbc68c89147f43d24f3be2d8e1b4 (patch) | |
tree | b20fd15ed5f52df93d016c793b6b1f7f1508208d /pingu-controller.lua | |
parent | f002085aa342bf1df6d37c67a63c54bee742101f (diff) | |
download | acf-pingu-8b49a54dfe53bbc68c89147f43d24f3be2d8e1b4.tar.bz2 acf-pingu-8b49a54dfe53bbc68c89147f43d24f3be2d8e1b4.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 'pingu-controller.lua')
-rw-r--r-- | pingu-controller.lua | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/pingu-controller.lua b/pingu-controller.lua index f70e7ac..f11d3d6 100644 --- a/pingu-controller.lua +++ b/pingu-controller.lua @@ -1,15 +1,17 @@ -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 expert(self) +function mymodule.expert(self) return self.handle_form(self, self.model.get_filedetails, self.model.update_filedetails, self.clientdata, "Save", "Edit Pingu Config", "Configuration Set") end + +return mymodule |