lua-users home
lua-l archive

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


David Manura <dm.lua@math2.org> wrote:
> Thomas Lauer writes:
> > with this module...I get some weird results...
> > The rawget() call in checkglobals() is too restrictive, methinks. How
> about changing this call to env[name]:
> 
> Hmm... env[name] is what I had.  There isn't any rawget in my patch, but a
> rawget in there would explain the difference you saw.  Check my original patch.

Strange indeed. I copied the patch a few days ago from the Wiki page and
I did change the error() line to a print(). But that shouldn't change
the env[name] to a rawget() unless there was magic in the air.

As to the many-modules-in-a-single-library-file problem, I'll stick with
my own solution. However, checkglobals() is a handy tool for checking
programs. Thanks for dreaming it up.

And perhaps, in a few years' time, the Gods will hand down full globals
and a nil that's not a nil.

-- 
cheers  thomasl

web: http://thomaslauer.com/start