[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Search paths in require/packages
- From: Robert Virding <robert.virding@...>
- Date: Sun, 24 Nov 2013 00:54:55 +0100 (CET)
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.
----- Original Message -----
> From: "Rob Hoelz" <email@example.com>
> On 11/14/13 10:57 AM, Robert Virding wrote:
> > In require/package module there are two search paths defined: path for
> > finding a Lua loader, and cpath for finding a C loader. There is a
> > function package.searchpath for traversing a path to find a file. However,
> > I can't seem to find a path for finding the actual module to load. Is
> > there one, if so where is it? If not, how is normally this handled.
> > Robert
> My procure module (https://github.com/hoelzro/lua-procure) demonstrates
> how Lua's require() function works in pure Lua code. If you're looking
> for a textual description, you can find it here: