lua-users home
lua-l archive

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


Hi,

If you call luaopen_socket_core through require, it doesn't matter much
if it was in its own dll (socket/core.so) or if it was preloaded in
package.preload. In both case it will create the module socket.core. And
nothing prevents you from loading socket (ie socket.lua) afterwards.

Maybe the problem is that if you require socke.core, it will
create a the "socket" table, and store a variety of
functions there.  If you later require"socket" on your own,
socket.lua won't be loaded.  The "socket" table created by
sockt.core will be returned directly instead.

I think I could have set things up so that socket.core
creates its own independent module table, and then have
socket.lua explode this table into the "socket" table it
creates, adding the high-level functionality on top of that.
I didn't think it would be worth the trouble, and I am still
not sure it is.

Regards,
Diego.