lua-users home
lua-l archive

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

I didn't create the package.preload table so it seems improper for me to set
a metatable for it. What if some day a version of package system set its own
metatable on the table? What if competing pieces of code wanted to set the
metatable on package.preload?

Getting back to the start of this thread, I heartily endorse some form of
external loader mechanism. It ought to make it much easier to integrate what
we already have working though we'd need to address the issue that we allow
a single script to export multiple namespaces.


on 1/11/05 5:23 PM, Diego Nehab at wrote:

> Setting the __index metamethod of the package.preload table is a
> perfectly fine way of overriding the standard search logic. It is just
> as valid as filling that table at startup, with statically linked
> entrypoints.