lua-users home
lua-l archive

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


> The "Javier" solution (and most other similar solutions) does not solve
> the problem of packing diferent packages into a single DLL. Moreover, it
> is incompatible with the "fixed-name" approach that (partially) solves
> that problem (and some others). However, the fixed-name approach
> does not allow several packages each packed into a single DLL.

Certainly I'm missing something, but I just didn't get why it is 
incompatible. If one sets cpath like:

package.cpath = "?.so;/usr/lib/lua/?.so;/usr/lib/lua/extramod.so"

and makes extramod.so exports functions like:

luaopen_lib
luaopen_lib_bar
luaopen_lib_baz

Won't I be able to require "lib", "lib.bar" and "lib.baz"? As Javier 
pointed out earlier, the new behavior (i.e. load their parents) could only 
be trigged if you cannot find "lib.bar" in cpath or path the way it is 
done now. Maybe you could even try all loaders again at each parent load 
attempt.

Renato Maia.