diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/skang.lua | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/skang.lua b/lib/skang.lua index e44d4bc..8de692e 100644 --- a/lib/skang.lua +++ b/lib/skang.lua | |||
@@ -117,6 +117,8 @@ moduleBegin = function (name, author, copyright, version, timestamp, skin, isLua | |||
117 | end | 117 | end |
118 | 118 | ||
119 | _M._M = _M -- So that references to _M below the setfenv() actually go to the real _M. | 119 | _M._M = _M -- So that references to _M below the setfenv() actually go to the real _M. |
120 | --[[ TODO - Check if it exists before doing this, or could override standard Lua stuff. ]] | ||
121 | _M[name] = _M -- So that the module can refer to itself internally. | ||
120 | _M._NAME = name | 122 | _M._NAME = name |
121 | _M._PACKAGE = string.gsub(_M._NAME, "[^.]*$", "") -- Strip the name down to the package name. | 123 | _M._PACKAGE = string.gsub(_M._NAME, "[^.]*$", "") -- Strip the name down to the package name. |
122 | _M.isLua = isLua | 124 | _M.isLua = isLua |