lua-users home
lua-l archive

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


On Mar 30, 2012, at 11:22 PM, Petite Abeille wrote:

> But now when running the resulting Nanoki.luac in 5.2, I get the following exception:

For what's worth, here is a self-contained example of the issue:


$ cat TestA.lua
local print = print

module( 'TestA' )

print( _NAME )


$ cat TestB.lua
local print = print

module( 'TestB' )

print( _NAME )


$ cat TestC.lua
local TestA = require( 'TestA' )
local TestB = require( 'TestB' )

print( 'TestC' )


$ lua -v TestC.lua
Lua 5.2.0  Copyright (C) 1994-2011 Lua.org, PUC-Rio
TestA
TestB
TestC


$ luac -o TestC.luac TestA.lua TestB.lua TestC.lua


$ lua TestC.luac
TestA
lua: TestB.lua:3: attempt to call global 'module' (a nil value)
stack traceback:
	TestB.lua:3: in main chunk
	(luac): in main chunk
	[C]: in ?


Thoughts?