lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


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