diff options
author | Ted Trask <ttrask01@yahoo.com> | 2013-10-21 00:55:30 +0000 |
---|---|---|
committer | Ted Trask <ttrask01@yahoo.com> | 2013-10-21 00:55:30 +0000 |
commit | fc996d5c5c994a13d81d336c9fbeda120685cc42 (patch) | |
tree | 1d3c3167a7495c25146f48787ac70f87b9ecc798 /vlc-controller.lua | |
parent | 345446b1499f93da9ab64a8b2dade8cf4f00a336 (diff) | |
download | acf-vlc-daemon-fc996d5c5c994a13d81d336c9fbeda120685cc42.tar.bz2 acf-vlc-daemon-fc996d5c5c994a13d81d336c9fbeda120685cc42.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 'vlc-controller.lua')
-rw-r--r-- | vlc-controller.lua | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/vlc-controller.lua b/vlc-controller.lua index 12f0fe6..ddfef2d 100644 --- a/vlc-controller.lua +++ b/vlc-controller.lua @@ -1,25 +1,27 @@ -module(..., package.seeall) +local mymodule = {} -mvc = {} -mvc.on_load = function(self, parent) +mymodule.mvc = {} +mymodule.mvc.on_load = function(self, parent) self.model.set_processname(string.match(self.conf.prefix, "[^/]+")) end -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.getconfigfile, self.model.setconfigfile, self.clientdata, "Save", "Edit Config File", "Configuration File Set") end -function logfile(self) +function mymodule.logfile(self) return self.model.get_filedetails(self.clientdata.name or "", self.clientdata.grep) end + +return mymodule |