[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Access From Inside Modules
- From: Stefan Brantschen <sbr@...>
- Date: Sun, 23 Jul 2006 09:22:59 +0200
On 22 Jul 2006, at 15:49, Tomas wrote:
local _G = _G
And qualify all globals in your program: _G.ipairs.
Sure. But again, this way _all_ globals are accessible from inside
the module, and I don't see the module's "providers" (and thus the
dependencies) clearly specified at the top, as with "package.seeall".
local assert, ipairs, type = assert, iparis, type
Which could became a long line.
Easiest would be something like (example)
local string = require "string"
local table = require "table"
module(..., package.seebasics) -- as suggested also by Andre
Thanks and regards