[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Lua Unofficial FAQ Addition
- From: Patrick Donnelly <batrick@...>
- Date: Thu, 6 Oct 2011 11:53:27 -0400
On Thu, Oct 6, 2011 at 4:04 AM, steve donovan <firstname.lastname@example.org> wrote:
> On Wed, Oct 5, 2011 at 7:36 PM, Rob Hoelz <email@example.com> wrote:
>> "How do I tell require to search relative to the current module?"
> It's a good question, because it illuminates the central role of package.path.
> The solution I use is to look at _G.arg and work out the base path
> from that; this seems to work fine and is the basis for
> app.require_here() in Penlight: Then we modify package.(c)path
Hmm, I interpreted this question to mean requiring sub-modules. For
example, instead of socket.lua doing:
it can instead do
The solution for this is a new package search loader I would imagine.
Maybe this isn't what the OP wanted though.
- Patrick Donnelly