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. --- hostname-controller.lua | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'hostname-controller.lua') diff --git a/hostname-controller.lua b/hostname-controller.lua index c68c5c3..255f23c 100644 --- a/hostname-controller.lua +++ b/hostname-controller.lua @@ -1,12 +1,14 @@ -- the hostname controller -module (..., package.seeall) +local mymodule = {} -default_action = "read" +mymodule.default_action = "read" -read = function(self) +mymodule.read = function(self) return self.model.get(true) end -edit = function(self) +mymodule.edit = function(self) return self.handle_form(self, self.model.read_name, self.model.update_name, self.clientdata, "Save", "Edit Hostname", "Hostname Set") end + +return mymodule -- cgit v1.2.3