I can confirm that it won't work. When a file is called with require, it passes as arg the path to the module. The trick Kikito mentions captures that path, and removes the module name at the end, so that it just remains the top folder address.Nixola wrote:I fear the path trick doesn't work if someone uses lf.load instead of require. There should be no reason for that, but you can never be too sure
I tend to use the same in my libs, games. I think it is nicer than those dofile/loadfile.
But since MiddleClass is a library, IMO it should not be called using load.filesystem.load, or loadfile, or dofile. require should preferred here.
@kikito: I do recommended to update the Readme and add some lines / snippets for that path trick.
Quite impressive for a learning project. Mine was a "hello world".kikito wrote:middleclass was my learning project in Lua.