lua-users home
lua-l archive

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


>> 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).
>
>
> I recall a discussion about splitting the 'require' logic in two parts. I 
> don't remember if it was on the Kepler dev's list or here. Anyway, it was 
> about decoupling the process of finding a module from the actual loading of 
> the module. Surely someone who took part in that discussion will be reading 
> this.
>
> Will issues like this be addressed in Lua 5.2 ?

'require' already decouples its process of finding a module, using
loaders. This new function package.searchpath will easy the task of
writing new loaders. (E.g., both the C loader and the Lua loader are
just calls to searchpath.)

-- Roberto