[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: FAQ? combining all modules into a single bytecode file
- From: "Jerome Vuarand" <jerome.vuarand@...>
- Date: Fri, 1 Aug 2008 14:54:30 +0200
2008/8/1 Tony Finch <firstname.lastname@example.org>:
> On Thu, 31 Jul 2008, Christian Lindig wrote:
>> Today, luac compiles multiple modules by prepending code that calls each
>> chunk (i.e. module). As a consequence, embedded 'requires' are executed
>> before all modules are executed. Is this behavior still useful in the
>> presence of 'module' and 'require'?
> It works OK for me if I present the modules to luac sorted so that all
> require calls occur after the corresponding module call.
That's why it's easier to only preload the modules. You can preload
them in any order, the actual loading will happen when necessary, when