Skip to content

Instantly share code, notes, and snippets.

@catwell
Created September 29, 2012 10:41
Embed
What would you like to do?
Why you should not rely on global state in Lua modules
require "socket"
require "socket.unix"
print(socket.tcp)
-- result: function: 0x1773ef0
require "socket.unix"
require "socket"
print(socket.tcp)
-- result: nil
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment