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. --- alpineversion-model.lua | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'alpineversion-model.lua') diff --git a/alpineversion-model.lua b/alpineversion-model.lua index b839785..80e38cf 100644 --- a/alpineversion-model.lua +++ b/alpineversion-model.lua @@ -1,12 +1,14 @@ -- alpineversion model methods -module (..., package.seeall) +local mymodule = {} fs = require("acf.fs") -get = function () +mymodule.get = function () local liboutput = fs.read_file("/etc/alpine-release") if (liboutput == nil) or (liboutput == "") then liboutput = "Unknown version" end return cfe({ value=liboutput, label="Alpine version" }) end + +return mymodule -- cgit v1.2.3