title: Set a global require
body: <p>I have the following code snippet</p>
  
  <pre><code>function initializeWorld()
      _G.require = function(name)
              if package.loaded[name] == nil then
                      local result, err = external.MyAPIEndpoint:LUAInclude(name .. '.lua') 
                      if err == nil then
                          if result ~= nil then
                                  package.loaded[name] = result
                          else
                                  package.loaded[name] = true
                          end
  
                          return package.loaded[name]
                      else
                          local errTxt = err .. "\r\n" .. debug.traceback()
                          error(errTxt, 1)
                      end
              else
                      return package.loaded[name]
              end
      end
  
      helloWorld = require ("helloWorld")
      print(helloWorld.welcome())
  end
  
  function initializeUniverse()
      _G.require = function(name)
              if package.loaded[name] == nil then
                      local result, err = external.MyAPIEndpoint:LUAInclude(name .. '.lua') 
                      if err == nil then
                          if result ~= nil then
                                  package.loaded[name] = result
                          else
                                  package.loaded[name] = true
                          end
  
                          return package.loaded[name]
                      else
                          local errTxt = err .. "\r\n" .. debug.traceback()
                          error(errTxt, 1)
                      end
              else
                      return package.loaded[name]
              end
      end
  
      helloUniverse = require ("helloUniverse")
  
      print(helloUniverse.welcome())
  
  end
  </code></pre>
  
  <p>As you can see that the <code>global requires</code> is used in two different places. once in <code>initializeWorld</code> and the other in <code>initializeUniverse</code> </p>
  
  <p>Can I make ammendments to the code such that it is loaded only once ?  </p>
  
  <p>Thanks</p>