lua-users home
lua-l archive

Re: Lua modules and packaging

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


Hi,
> * What is the general advice on how to package your own lua source code
> modules?
There is an ongoing discussion on the topic. Don't use LuaSocket as the
authoritative way of doing it, just as an example. The README/INSTALL
files and the user's manual explain how to use it the way it is now.
Ideally, Lua 5.1 will provide a scheme that everyone will accept as the
standard. People have not agreed on a standard yet, but it is cooking. I
will probably start a new round of negociations soon.
Regards,
Diego.
Quoting the documentation:
 For my Mac OS X box, for instance, I place all files in
 /Users/diego/tec/luasocket and set the following environment variables:
 LUA_INIT=@/Users/diego/tec/luasocket/lua.lua
 LUA_PATH=/Users/diego/tec/luasocket/?.lua;?.lua
 LUA_PATHLIB=/Users/diego/tec/luasocket/?.dylib;?.dylib
 With that, I can run any luasocket application with the command line:
 lua <script>
 as long as the script uses "require" to load the needed namespaces.
 Much nicer than having to build a new executable just to initialize
 LuaSocket!
Notice that lua.lua is automatically loaded by the interperter. That's
what LUA_INIT does.

AltStyle によって変換されたページ (->オリジナル) /