diff options
author | Ted Trask <ttrask01@yahoo.com> | 2013-10-21 00:02:20 +0000 |
---|---|---|
committer | Ted Trask <ttrask01@yahoo.com> | 2013-10-21 00:02:20 +0000 |
commit | 2262acb8dbee2e6005e679d454e5d4358ab443eb (patch) | |
tree | ad2aa4bf237c205d10e52db75524634c0a804e97 /bgp-controller.lua | |
parent | 31e61f1805982e6368bc77703e161af674c7687c (diff) | |
download | acf-quagga-2262acb8dbee2e6005e679d454e5d4358ab443eb.tar.bz2 acf-quagga-2262acb8dbee2e6005e679d454e5d4358ab443eb.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 'bgp-controller.lua')
-rw-r--r-- | bgp-controller.lua | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/bgp-controller.lua b/bgp-controller.lua index 15d7658..3c29ba2 100644 --- a/bgp-controller.lua +++ b/bgp-controller.lua @@ -1,20 +1,21 @@ -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 details(self) +function mymodule.details(self) return self.model.getdetails() end -function expert(self) +function mymodule.expert(self) return self.handle_form(self, self.model.getconfigfile, self.model.setconfigfile, self.clientdata, "Save", "Edit BGP Config", "BGP Configuration Saved") end -function startstop(self) +function mymodule.startstop(self) return self.handle_form(self, self.model.get_startstop, self.model.startstop_service, self.clientdata) end +return mymodule |