code: func PackageOpen(l *State) int {
  	NewLibrary(l, packageLibrary)
  	createSearchersTable(l)
  	l.SetField(-2, "searchers")
  	setPath(l, "path", "LUA_PATH", defaultPath)
  	l.PushString(fmt.Sprintf("%c\n%c\n?\n!\n-\n", filepath.Separator, pathListSeparator))
  	l.SetField(-2, "config")
  	SubTable(l, RegistryIndex, "_LOADED")
  	l.SetField(-2, "loaded")
  	SubTable(l, RegistryIndex, "_PRELOAD")
  	l.SetField(-2, "preload")
  	l.PushGlobalTable()
  	l.PushValue(-2)
  	SetFunctions(l, []RegistryFunction{{"require", func(l *State) int {
  		name := CheckString(l, 1)
  		l.SetTop(1)
  		l.Field(RegistryIndex, "_LOADED")
  		l.Field(2, name)
  		if l.ToBoolean(-1) {
  			return 1
  		}
  		l.Pop(1)
  		findLoader(l, name)
  		l.PushString(name)
  		l.Insert(-2)
  		l.Call(2, 1)
  		if !l.IsNil(-1) {
  			l.SetField(2, name)
  		}
  		l.Field(2, name)
  		if l.IsNil(-1) {
  			l.PushBoolean(true)
  			l.PushValue(-1)
  			l.SetField(2, name)
  		}
  		return 1
  	}}}, 1)
  	l.Pop(1)
  	return 1
  }
docs: // PackageOpen opens the package library. Usually passed to Require.