lua-users home
lua-l archive

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


> Loaders of the standard libraries are designed to be just executed.
> Modules that are designed to be loaded through require may rely on the
> extra features of require to work properly (ie. setting
> package.loaded[modname] to the return value of the loader).

The standard libraries do that too:

> print(io)                 --> table: 0x806ce40
> print(package.loaded.io)  --> table: 0x806ce40
> print(require("io"))      --> table: 0x806ce40

-- Roberto