lua-users home
lua-l archive

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


Hi,
      Currently if package.path has a path like:

C:\a\b\c\..\?\d\?.lua

Then it require("mod") searches for

C:\a\b\c\..\mod\d\mod.lua  -> C:\a\b\mod\d\mod.lua

This is good.

require("mod.submod") searches for

C:\a\b\c\..\mod\submod\d\mod\submod.lua

It would be much better I think if it searched:

C:\a\b\c\..\mod\d\mod\submod.lua

It can be achieved by adding a custom searcher in the package.searchers but wouldn't it support a better hierarchy of code if the existing searcher did that? 

Thanks,
Milind