lua-users home
lua-l archive

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


In message <200109271233.JAA22228@magritte.tecgraf.puc-rio.br>, Luiz Henrique d
e Figueiredo writes:
> >How to include:
> >dofile("stdlua.lua")
> >
> >stdlua.lua should only expose a single global variable "stdlua" and all
> >functions should be members in stdlua.
> 
> I suggest a more flexible scheme: in stdlua.lua (or whatever the name is),
> test whether a table called "stdlua" exists. If it does, then stdlua.lua shou
>>ld
> define only those functions whose name appear in the table. In this way, user
>>s
> can choose the functions they need.

Why not have spong.lua return an anonymous table.  Callers can then pull
out whatever functions they need or simple assign the table to the
variable spong.

drj