lua-users home
lua-l archive

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


> > _LOADED is used "read-only", so require could keep a private reference
> > to it?
> If it is a private reference, there still needs to be a mechanism
> for the C API to access and/or replace that table, even if it's not
> readily exposed to script.
> [...]
> OTOH maybe it's good that _LOADED is in the global scope, [...]

The global variable _LOADED will still point to the table of loaded
packages, but `require' will not use it. So it is easy to access it
(but it is impossible to replace).

-- Roberto