lua-users home
lua-l archive

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


Hi,

I think that shows it's a good habit to use the string
passed to the module init function as the module name
instead of a hard coded string.  You never know how people
will use (and sometime rename) your modules (even private
submodules as in that case).

I don't think there is anything to fix. :) There were two
options. I optimized for the common case. I did consider the
other option, but it seemed unnatural. They are the same
package, only some functionality is written in Lua.

At any rate, I am sure it is possible to load socket.core,
then hack package.loaded so that load socket.lua loads just
fine after that.  I just don't see why somebody would want
to do that, i.e., load only socket.core to save something,
then later decide he/she actually wants the whole
socket.lua thing.

Regards,
Diego.