[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Location of a package
- From: Fabien <fleutot+lua@...>
- Date: Tue, 19 Feb 2008 22:55:11 +0100
On Feb 18, 2008 9:19 PM, Roberto Ierusalimschy <email@example.com> wrote:
> It's unfortunate that the package finder function isn't exposed in Lua [...]
Lua 5.2 will include a package.searchpath function. It is similar
> Metalua needs it, and reimplements it.
to this package.findfile, but it returns only the file name (not the
It was the initial plan, but findfile() had to attempt opening the file anyway (as does the original Lua version IIRC), and it happened that all its use cases in metalua required to open the found file, so I just saved a close+reopen.