lua-users home
lua-l archive

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


On Jul 21, 2010, at 5:20 PM, HyperHacker wrote:

> Well that eliminates the need for a long list of "local x, y, z = G.x,
> G.y, G.z" in Stuart's example; instead of e.g. "local math = G.math"
> you can access math through package.loaded, so maybe set it as a
> fallback __index for G. Notably print isn't in there though...

$ lua
Lua 5.1.4  Copyright (C) 1994-2008 Lua.org, PUC-Rio
> package.loaded._G.print("foo")
foo
> 

e