lua-users home
lua-l archive

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


My apologies; I forgot that we're all supposed to pay attention to
the return value of "require" these days.  Here's a replacement for
my replacement:

  local oldRequire = require
  function require (...)
    local wasInsideRequire = isInsideRequire
    isInsideRequire = true
    local t = oldRequire(...)
    isInsideRequire = wasInsideRequire
    return t
  end