lua-users home
lua-l archive

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



> You know what the problem was? I was inputting the lines at the Lua
> command prompt and thus "local tmp = ... " was different variable than
> the one in "print (tmp)". Oops... Sorry all...

You said:

"Yes, I understand perfectly. However, according to the documentation
for "require" (http://www.lua.org/manual/5.1/manual.html#pdf-require),
after calling require ("foo") while the "foo" file begins with
"module(bar)", the value of package.loaded["foo"] ("foo", not "bar"!)
should be set to true, which it isn't. It's nil!"

Did you actually test package.loaded.foo is nil or not?  I'm betting you did not.

-Patrick Donnelly

"One of the lessons of history is that nothing is often a good thing to do and always a clever thing to say."

-Will Durant