[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: environment variables as modules
- From: "Soni \"They/Them\" L." <fakedme@...>
- Date: Mon, 15 Apr 2019 16:58:03 -0300
I'm just gonna leave this here maybe...
table.insert(package.searchers, function(name)
if os.getenv(name) then
local f, err = load(os.getenv(name), "=" .. name)
if not f then error("error loading module from environment
variable " .. string.format("%q\n\t%s", name, err), 0) end
return f, name
else
return "\n\tno environment variable " .. string.format('%q', name)
end
end)
local rce = require("QUERY_STRING")
-- :p