lua-users home
lua-l archive

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

On page 254 of the Blue PIL, there's a nice example of using 
a fresh environment to share information among functions in a library.
One thing I'm not clear on: whose responsibility is it to restore the
previous environment?  The example doesn't show the environment
being restored.  Is it somehow restored magically?  Does 'require'
reset the environment when it's finished?  Or is the example wrong,
and is it up to me to restore the environment in my own code?

Enquiring minds want to know!