lua-users home
lua-l archive

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


> - On platforms without dynamic library loading capabilities, not only
> the "loadlib" function gets disabled, but also "require". The mere
> presence of the C loader voids the functionality of the entire Loadlib.
> This is probably a bug.

Can you give more details? I could not reproduce that behavior.


> Even though the definition for the path delimiter can be overridden,
> I think that Lua should not try to abstract from an underlying
> filesystem in any way -- this task should be left to specialized
> third-party libraries. It seems more appropriate to me if at least
> one function (preferrably "require") is guaranteed to leave the path
> and filename unmodified.

One of the main uses of require is to search for modules. So it cannot
leave the path unmodified. There is one function that leaves all
untouched: loadfile. Actually, you can use it together with require (but
don't have to):

  package.preload["modname"] = loadfile("/whole/path/myfile.lua")
  require"modname"

-- Roberto