[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Loading multiple source files into a single scope
- From: lua@...
- Date: Sun, 4 Apr 2010 19:32:26 +0200
Hello,
In our application framework I'd like to be able to load multiple source
files in the same scope to be able to access local variables between
source files while avoiding explicit namespace or globals. A naive
approach is to just read all source files, concatenate and pass to
loadstring(). This works just fine, but has the disadvantage that
debugging symbols do no longer point to the right line numbers, messing
up error messages and stack backtraces.
Is there a simple method to accomplish the above without this problem ?
Thank you,