diff options
author | Kaarle Ritvanen <kaarle.ritvanen@datakunkku.fi> | 2013-06-28 23:31:21 +0300 |
---|---|---|
committer | Kaarle Ritvanen <kaarle.ritvanen@datakunkku.fi> | 2013-09-04 15:24:08 +0300 |
commit | 25ffc62a5b2c9a65e5c1689d5351adcf8cbef7e2 (patch) | |
tree | 7703761a8c13778b4aa6ef07d64628e760d6ba6f /acf/persistence/util.lua | |
parent | 63942c3e11107bb1f3f5d874a2f3b694bb510f39 (diff) | |
download | aconf-25ffc62a5b2c9a65e5c1689d5351adcf8cbef7e2.tar.bz2 aconf-25ffc62a5b2c9a65e5c1689d5351adcf8cbef7e2.tar.xz |
eliminate deprecated module style
Diffstat (limited to 'acf/persistence/util.lua')
-rw-r--r-- | acf/persistence/util.lua | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/acf/persistence/util.lua b/acf/persistence/util.lua index 46de5eb..a657411 100644 --- a/acf/persistence/util.lua +++ b/acf/persistence/util.lua @@ -1,20 +1,22 @@ --[[ -Copyright (c) 2012 Kaarle Ritvanen +Copyright (c) 2012-2013 Kaarle Ritvanen See LICENSE file for license details --]] -module(..., package.seeall) +local M = {} -function open_file(path, mode) +function M.open_file(path, mode) local file = io.open(path, mode) if not file then error('Cannot open file: '..path) end return file end -function read_file(path) - local file = open_file(path) +function M.read_file(path) + local file = M.open_file(path) local data = '' for line in file:lines() do data = data..line end file:close() return data end + +return M |