diff options
author | Hisham Muhammad <hisham@gobolinux.org> | 2022-06-06 15:28:14 -0300 |
---|---|---|
committer | Hisham Muhammad <hisham@gobolinux.org> | 2022-06-06 17:14:52 -0300 |
commit | bec4a9cbf72c8e392163f50f7b6bbb18763d9f90 (patch) | |
tree | ec131971a48b331bdd05b074eb365f3bae1d3d36 /spec/util | |
parent | 292a274fd02b88a729d474b544829c53e138a57b (diff) | |
download | luarocks-bec4a9cbf72c8e392163f50f7b6bbb18763d9f90.tar.gz luarocks-bec4a9cbf72c8e392163f50f7b6bbb18763d9f90.tar.bz2 luarocks-bec4a9cbf72c8e392163f50f7b6bbb18763d9f90.zip |
loader.which: new option for searching package.path and cpath
Adds a new second argument, `where`, a string which indicates places
to search for the module.
If `where` contains "l", it will search using the LuaRocks loader; if it
contains "p", it will look in the filesystem using package.path and
package.cpath. You can use both at the same time.
If successful, it will return four values.
* If found using the LuaRocks loader, it will return:
* filename of the module (eg. "/usr/local/lib/lua/5.1/socket/core.so"),
* rock name
* rock version
* "l" to indicate the match comes from the loader.
* If found scanning package.path and package.cpath, it will return:
* filename of the module (eg. "/usr/local/lib/lua/5.1/socket/core.so"),
* "path" or "cpath"
* nil
* "p" to indicate the match comes from scanning package.path and cpath.
If unsuccessful, nothing is returned.
Diffstat (limited to 'spec/util')
0 files changed, 0 insertions, 0 deletions