Skip to content

Instantly share code, notes, and snippets.

@iamalbert
Last active August 30, 2016 21:06
Show Gist options
  • Save iamalbert/ee56f456690513f7a203a66eba1ad130 to your computer and use it in GitHub Desktop.
Save iamalbert/ee56f456690513f7a203a66eba1ad130 to your computer and use it in GitHub Desktop.
-- in global scope
if not ... then
print "main"
else
print "library"
end
[[
$ luajit test.lua
main
$ luajit -ltest
library
$ luajit -e " require './test' "
library
]]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment