lua-users home
lua-l archive

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


2013/11/23 Robert Virding <robert.virding@erlang-solutions.com>:
> Your implementation does it pretty much as how I would expect it to handle package.path, and as how I will implement it, but I can't reconcile it with what it says in the documentation (both 5.1 and 5.2):
>
> "The path used by require to search for a Lua loader."
>
> I read it as the path to search for the loader not the file. This could be just me interpreting it incorrectly.

The two paths are used by searchers, which role is to find and return
loaders, not files. The require function itself has no concept of
file, only searchers, loaders, and modules. Some modules may not have
an associated file. So writing "used by require to search for a [...]
file" wouldn't make sense.

It could read "The path used by the Lua module searcher to find a Lua
module file.". But is that clearer?