lua-users home
lua-l archive

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


I'm playing with "package.alias" so i can set up a mapping (eg. via luainit), so that require"ltn12" knows to look in socket.dll, without having to require (and load) socket.

How does that work? Is package.alias specific to RC or is it generic
enough to say: Hey, the entrypoint for package "foo" is actually in the
library of package "bar". Does that even make sense? It would for C, but
not for Lua.

Why don't you like the preload solution? You wouldn't need the
package.alias table.

ps no c code need be modified; require"rcloadlib" will insert the new loader etc., it just needs duplicates of several loadlib internal fn's, like findfile() etc.

Perhaps findfile should be exported by the package table? Lua Authors?
I actually suggested this some time ago, off-line I believe.