lua-users home
lua-l archive

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

I am trying to brush up on my understanding of modules, but this is so basic I'm almost embarrassed :)  Why in the following code is string a nil value? I would expect the string module to be loaded into the module environment and correctly found at the time of the print call.

local require, print = require, print
module 'mymodule'
require 'string'
print(string.format('%s', 'some string'))