lua-users home
lua-l archive

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


Ack! It got wrapped. Ok, I'm trying again...
 
function safeload(filename, glob)
local act
glob = glob or getglobals()
act = function()
      local f, e
      f, e = loadfile(filename)
      if f then return f()
      else return nil, e end
      end
setglobals(act,glob)
return act()
end
 



-- 
"No one knows true heroes, for they speak not of their greatness." -- 
Daniel Remar.
Björn De Meyer 
bjorn.demeyer@pandora.be