lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


I have a bunch of lua files and inside those files I create a table to
hold the contents as a 'private' namespace. e.g

app = {}

function app.init(data)
 app.userdata = data
end

I've seen syntax along the lines of module('foo') and function
foo:bar(baz) but these appear to not be in the PIL book and I can't
find any example in the wiki.

Could anyone tell me about Lua code modularization or point me to a
place I can read about it?

-- G.