[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: How to query current path from a library?
- From: Jonathan Castello <twisolar@...>
- Date: Mon, 22 Feb 2010 16:41:45 -0800
On a related note, is there any chance that Lua 5.2 will allow
require() to take additional parameters that will be passed to the
loaded chunk? That's the only reason I really need to use loadfile(),
to pass my own parameters. require() already passes the module name
(that's what I see everyone using in module()), I don't think it would
be that much of a stretch.
On Mon, Feb 22, 2010 at 11:21 AM, Petite Abeille
> On Feb 22, 2010, at 8:00 PM, Jonathan Castello wrote:
>> Good timing, I was looking for a way to do this, too! I wish I didn't
>> have to resort to using the debug library, though...
> In 5.2, with some restrictions, you could possibly use package.searchpath( _NAME, package.path ) as an alternative.