lua-users home
lua-l archive

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


> Is there a technical reason why require() can't be modified to pass
> through extra arguments?

require"mymodule" loads a module named "mymodule", and that's not necessarily
a file. The essential thing that require does is to keep track of which modules
have been loaded and not load them again.

Also, what do you expect to happen if you require the same module with
different arguments? Is the module really loaded twice or what?

require("mymodule",1)
require("mymodule",10,20)