我想知道是否有办法只执行一次lua文件并且有任何后续尝试执行该lua文件将导致无操作.
我已经考虑过做类似于C header的#if / else / endif技巧.我想知道是否有一种标准的方法来实现它.
詹姆士
解决方法
好吧,几乎要求那样做.
require "file" -- runs "file.lua" require "file" -- does not run the "file" again