Skip to content

Instantly share code, notes, and snippets.

@Bonuspunkt
Last active August 29, 2015 14:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Bonuspunkt/393ad9b67646d4d5c27e to your computer and use it in GitHub Desktop.
Save Bonuspunkt/393ad9b67646d4d5c27e to your computer and use it in GitHub Desktop.
_G.dependency = {
sayWhat = function() _G.consolePrint("SAY WAT?")
}
-- won't work w/o this require
require "dependency.lua"
_G.dependency.sayWhat()
-- works here too, but where did it come from
_G.dependency.sayWhat()
-- same as above but less obvious, imagine its in the middle of a code block
dependency.sayWhat()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment