[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Setting the directory Lua searches for "require" from the host app
- From: Kevin Martin <kev82@...>
- Date: Wed, 18 Jun 2014 13:43:31 +0100
On 18 Jun 2014, at 13:39, Lars Ruoff <email@example.com> wrote:
> So how do i tell the Lua environment where to start searching for files when it encounters "require" in scripts?
Lua offers a massive amount of customisation in this regard
Initially I would look into the package.path variable
However, your could also consider preloading everything into package.preload, or writing a custom searcher and placing it in package.searchers.
> I hope this can be set by lua_state individually, since i will be loading several Lua scripts in parallel, each based in a different directory.
Yes, this is configurable per state.