Hello, I am porting some components from Kepler Project to the different platform than Linux. I have a problem with loading libraries in user's scripts. Because my platform does not support dynamic loadable modules I have to compile it as static. There was a little problem with loading socket.core and mime.core from LuaSocket but according to the lua forum a script preloader.lua from LOOP project can generate C file that stores these loaders into "package.preload" (http://loop.luaforge.net/release/preload.html). I am trying to use authentication and the statement require "cgilua.authentication" generates error. The stack traceback refers to "local mime=require"mime" -- from LuaSocket" in file cgilua/authentication.lua. However the examples from LuaSockets worked fine so I have tried to write simple script module.lua with:
for k, v in pairs (package.loaded) do print (k, v,"</BR>") end -- for loop for k, v in pairs (package.preload) do print (k, v,"</BR>") end -- for loop Normally before starting the Xavante, the table package.preload contains md5.core function: socket.core function: mime.core function: but in the script, the table package.preload is empty. I think it could have something to do with creating new lua state in the rings component. The loaded libraries are somehow re-opened but not from the package.preload. Please, could you point me where I should make changes to copy the table package.preload to the new lua state? Thank you very much Regards, Martin Velek _______________________________________________ Kepler-Project mailing list Kepler-Project@lists.luaforge.net http://lists.luaforge.net/cgi-bin/mailman/listinfo/kepler-project http://www.keplerproject.org/