lua-users home
lua-l archive

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



On Apr 26, 2007, at 5:03 AM, Thomas Lauer wrote:


But `require' only passes its first argument to the script :-(

Yeah, that's one of my pet peeves as well. It would be a really great
addition if ll_require() would push further arguments before it calls
the loaded module. ll_module() could then simply access these as further
parameters. This should even work with C libraries.

Alas, doing this would break most existing module code.


The arguments passed would come from the 'chunk' that happens to import the module first, and the correct functioning of your code would then depend on the order in which you directly or indirectly import modules. I'm not sure that that's what you'd want from a module system.


--
Gé Weijers