lua-users home
lua-l archive

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


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Roberto Ierusalimschy wrote:

| Otherwise, require looks for a file "mod" in the path package.cpath
| (typically it will be something like "./?.so;/usr/local/lib/lua/5.0/?.so"
| or "./?.dll;C:windows/?.dll").
| If found, it tries to call function "luaopen_mod" on that
| library to open it.
| Otherwise, it looks for "mod" in the path package.path (old LUA_PATH),
| loads it with "loadfile" and runs it.

Maybe the loader should look for a file "luamod" or something in the
package.cpath, so if you have a third party package in the file "mod.so"
you could place the bindings in "luamod.so" and use "require 'mod'" to
load the bindings.


Michael Roth

-----BEGIN PGP SIGNATURE-----
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFBWwc9SIrOxc3jOmoRAtzsAKDIk5k/LoTWuHiQ3oTvagbPtqQbSgCgs3kC
PKyvedCubsaJP1Jp0bYh5ag=
=MFph
-----END PGP SIGNATURE-----