[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: debug.getinfo( aLevel, 'S' ).source?
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: Wed, 6 Aug 2008 19:14:12 -0300
> In such scenario, debug.getinfo will return something like '@Module'
> as the source even though the source was loaded from 'all-in-one.luac'
> as specified in _G.arg[ 0 ].
I'm no sure what you mean. But consider this example:
% luac a.lua b.lua
% cat x.lua
% lua /tmp/x.lua
When combining several programs into one file, luac creates a hidden main
program that simply runs the given program. That hidden program in given
"=(luac)" as its source, in the absence of anything else that would be useful.
Like the other programs, the main program is precompiled and so keeps its
own notion of the source name. Changing the name of the file that contains
precompiled code does not affect the names stored in the files. Are you