lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


I'm happy to announce that I got around this rather annoying bug where
each wrapper function gets called immediately as soon as the merged
file is loaded via require.

In the past, that happened because the hook for package.* would
trigger the function call.
But in this new revision, I've added a grain of metatable sorcery to
solve this problem; It overloads the '__index' function of the
mergelua instance in order to serve the module.

This change will hopefully eradicate any possible race conditions,
where initiation of one module depends on another module.
The API didn't change; Infact, as long as your modules take proper
care of possible race conditions, you shouldn't notice any difference
at all. But it's probably an important change for the future of

regards, sebastian