[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Search paths in require/packages
- From: Rob Hoelz <rob@...>
- Date: Thu, 14 Nov 2013 11:07:56 +0100
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:
http://www.lua.org/manual/5.1/manual.html#pdf-require
-Rob