I suggested something in the other topic, but I had no comments... I really would like to have your opinion about this before releasing CPLua 0.9 :
Currently, doing
require("myLib")
is the same as
require("main/myLib")
because there is no package in CPLua called "mylib", and thus it searches in the "main" folder if no folder is specified.
I just thought that it would perhaps be easier if CPLua searched in the folder of the file that calls
require(). To be more precise:
Suppose you have a folder "Fol" with 2 files A and B.
If the file A requires the file B, you will have to write
require("Fol/B")
at the beginning of file A. My suggestion is that
require("B")
is equivalent to
require("Fol/B")
because A is in the folder "Fol". I think it would be easier if you want to rename folders etc, then you wouldn't have to change all the paths.
Note: if you call
require() from a new file (not saved), and if no folder is specified, CPLua would then look in the "main" folder.