lua-users home
lua-l archive

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


On Wed, May 22, 2013 at 6:21 AM, Sean Conner <sean@conman.org> wrote:
  Yes, but in Lua you reference it as package.path (and package.cpath for
modules written in C).

For instance, if your script and its modules are in d:\myprog, then your main script can do this:

package.path = "d:\\myprog\\?.lua;" .. package.path

pl.app.require_here() implements the pattern:

https://github.com/stevedonovan/Penlight/blob/master/lua/pl/app.lua