Do file only once in Lua
I was wondering if there's a way to do a lua file only once and have any subsequent attempts to do that lua file will result in a no-op. I've already thought about doing something akin to C++ header's #if/else/endif trick. I'm wondering if there's a standard way to implement this. James well, require pretty much does that. require "file" -- runs "file.lua" require "file" -- does not run the "file" again The only problem with require is that it works on module names, not file names. In particular, require does not handle names with paths (although it does use package.path and package.cpath to