lua-users home
lua-l archive

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


> On Wed, Feb 24, 2010 at 6:38 PM, Roberto Ierusalimschy
> <roberto@inf.puc-rio.br> wrote:
> > 1) Any chunk is compiled as if surronded by the following code:
> >
> >    local _ENV = <some value>; function (...) <chunk> end
> 
> So will libraries do this:
> 
> local _ENV = module "libraryname"

That is ok, but you may also use

  _ENV = module "libraryname"

No need to create a new variable.

-- Roberto