Module environ
Getting and setting environment variables.
Tables
environ | Table enabling easy access to environment variables. |
Tables
- environ
-
Table enabling easy access to environment
variables.
Has metamethods __index and __newindex, which allow for the table to be indexed with a string to get values of environment variables, or for fields to be set to set an environment variable.
Usage:
-- Print the value of an environment variable: print(environ["MYVAR"]) -- Set an environment variable: environ["MYVAR"] = 1