[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: require() relative to calling file
- From: steve donovan <steve.j.donovan@...>
- Date: Mon, 6 Feb 2017 09:16:10 +0200
On Sat, Feb 4, 2017 at 8:48 AM, Russell Haley <email@example.com> wrote:
> I have counter arguments but that's not the point. The only reason I
> spoke up is because I ran into this myself when I was starting with
> Lua. The way it searches the current path and chooses the defaults to
> search is opaque to casual users.
pl.app.require_here() does basically what you want:
The issue here is basically that Lua works mostly with absolute module
search paths (with the exception of "current directly"), and people
become accustomed to their application being 'special'.