lua-users home
lua-l archive

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


Is it possible to get an environment with local variables present too?

I'm trying:

function flarp()
    local myLocal = "hello"   
    local myEnv = getfenv()
    print(myEnv.myLocal) -- (prints nil)
end
flarp()


... but myEnv.myLocal is still nil.  Anyone know a way of doing this?  Or is it impossible?