> It's unfortunate that the package finder function isn't exposed in Lua [...]
> Metalua needs it, and reimplements it.
Lua 5.2 will include a package.searchpath function. It is similar
to this package.findfile, but it returns only the file name (not the
file handler).
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.
-- Fabien