lua-users home
lua-l archive

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


I have a question about the require() implementation ( and work4).

In luasocket beta3 Diego uses

socket=require'socket'
and this contains
socket=require'lsocket'

That is DN has two functions that populate the socket table.
The 'l' version must be invoked first. This is all fine and works.

The side effect is that package.loaded ends up with two entries that
point at the
same socket table namely; socket and lsocket.
So the question is what happens when we have say 30 functions that
populate a table?
Should require() reduce these two entries to one?
Is there a better way to do these multiple function loads?

DB

Andre Carregal  wrote:
> 
> Comments are welcome!