[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Lua Unofficial FAQ Addition
- From: steve donovan <steve.j.donovan@...>
- Date: Thu, 6 Oct 2011 10:18:40 +0200
On Thu, Oct 6, 2011 at 10:10 AM, Patrick Rapin <toupie300@gmail.com> wrote:
> (this is how I do most of the time), it doesn't work. The table arg is not
> defined in this case.
OK, so app.require_here() needs to fallback to using debug information
in this case.
But for the purposes of giving a 'simple' answer, I would say
_G.arg[0] is sufficient. We can always break the answer into two
parts (a) find out where your script is and (b) patch package.path
accordingly.
steve d.