From 2ece009273252437281c8cc0b84ba2ec49e5d07c Mon Sep 17 00:00:00 2001 From: Ted Trask Date: Thu, 17 Oct 2013 19:07:53 +0000 Subject: 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. --- rc-controller.lua | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'rc-controller.lua') diff --git a/rc-controller.lua b/rc-controller.lua index 63d9a94..4ec40b9 100644 --- a/rc-controller.lua +++ b/rc-controller.lua @@ -1,17 +1,19 @@ -- the rc controller -module (..., package.seeall) +local mymodule = {} -default_action = "status" +mymodule.default_action = "status" -status = function(self) +mymodule.status = function(self) return self.model.status() end -edit = function(self) +mymodule.edit = function(self) return self.handle_form(self, self.model.read_runlevels, self.model.update_runlevels, self.clientdata, "Save", "Edit Service Runlevels", "Runlevels Updated") end -startstop = function(self) +mymodule.startstop = function(self) return self.handle_form(self, self.model.get_startstop, self.model.startstop_service, self.clientdata) end + +return mymodule -- cgit v1.2.3