lua-users home
lua-l archive

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


It was thus said that the Great Sean Conner once stated:
> 
> a.lua
> 
> 	local mod = require "mod-1.2.3"
> 
> 	return {
> 	  foo = function()
> 	    print('This is module a')
> 	    mod.foo()
> 	  end
> 	}

  Oops.  I started writing the email before I completely finished my
testing.  The updated a.lua file should be:

	local mod = require "mod-v1.2.3"
	
	return {
	  foo = function()
	    print('This is module a')
	    mod.foo()
	  end
	}

  The results are still:

> lua: ./a.lua:2: module 'mod-v1.2.3' not found:
>         no field package.preload['mod-v1.2.3']
>         no file '/home/spc/.luarocks/share/lua/5.3/mod-v1/2/3.lua'
>         no file '/home/spc/.luarocks/share/lua/5.3/mod-v1/2/3/init.lua'
>         no file '/home/spc/.luarocks/lib/lua/5.3/mod-v1/2/3.lua'
>         no file '/home/spc/.luarocks/lib/lua/5.3/mod-v1/2/3/init.lua'
>         no file '/usr/local/share/lua/5.3/mod-v1/2/3.lua'
>         no file '/usr/local/share/lua/5.3/mod-v1/2/3/init.lua'
>         no file '/usr/local/lib/lua/5.3/mod-v1/2/3.lua'
>         no file '/usr/local/lib/lua/5.3/mod-v1/2/3/init.lua'
>         no file './mod-v1/2/3.lua'
>         no file './mod-v1/2/3/init.lua'
>         no file '/home/spc/.luarocks/lib/lua/5.3/mod-v1/2/3.so'
>         no file '/usr/local/lib/lua/5.3/mod-v1/2/3.so'
>         no file '/usr/local/lib/lua/5.3/loadall.so'
>         no file './mod-v1/2/3.so'
>         no file '/home/spc/.luarocks/lib/lua/5.3/mod-v1.so'
>         no file '/usr/local/lib/lua/5.3/mod-v1.so'
>         no file '/usr/local/lib/lua/5.3/loadall.so'
>         no file './mod-v1.so'
> stack traceback:
>         [C]: in function 'require'
>         ./a.lua:2: in main chunk
>         [C]: in function 'require'
>         prog.lua:3: in main chunk
>         [C]: in ?

  Just thought I should clarify that.

  -spc