lua-users home
lua-l archive

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


On Tue, 11 Jan 2005 15:57:58 -0500 (EST), Diego Nehab
<diego@tecgraf.puc-rio.br> wrote:
> How about you set the __index metamethod of the package.preload table and
> use it to trap package load attempts and dispatch them any way you might
> want?

I didn't think of that, but the idea of changing internal structures
doesn't attract me either.

Unless the package system was intended to be used this way, i would
not do it. I prefer to use an explicit way to interact with the
system.

Anyway, i don't think this would bloat the core. I know Lua was
designed to be kept small, but since the package system was added i
don't think the module loading modification will hurt.

Tiago