If I have a file structure like this:
./main.lua./mylib/mylib.lua./mylib/mylib-utils.lua./mylib/mylib-helpers.lua./mylib/mylib-other-stuff.lua
From main.lua
the file mylib.lua
can be loaded with full path require('mylib.mylib')
. But inside mylib.lua
I would also like to load other necessary modules and I don't feel like always specifying the full path (e.g. mylib.mylib-utils
). If I ever decide to move the folder I'm going to have a lot of search and replace. Is there a way to use just the relative part of the path?
UPD. I'm using Lua with Corona SDK, if that matters.