lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


>>>>> "RI" == Roberto Ierusalimschy <roberto@inf.puc-rio.br> writes:

 >> It's unfortunate that the package finder function isn't exposed in Lua by
 >> the native package lib. I hope it will be done
 >> in Lua 5.2.
 >> 
 >> Metalua needs it, and reimplements it. Look at function package.findfile()in
 >> http://repo.or.cz/w/metalua.git?a=blob_plain;f=src/lib/package2.lua, and
 >> give it your package's name as first arg,
 >> package.cpath or package.path as a second arg, depending on whether your
 >> module is in C or in Lua. Don't
 >> forget to close the file handle if you don't use it.

 RI> Lua 5.2 will include a package.searchpath function. It is similar
 RI> to this package.findfile, but it returns only the file name (not the
 RI> file handler).

Roberto, is there any description of upcoming changes in Lua 5.2?

-- 
Yours sincerely, Eugeny.
Doctor Web, Ltd. http://www.drweb.com
+79119997425