|
Many thanks for the tip. But, it seems to me, this should be the
default behavior.
From: Coroutines
Sent: Saturday, April 05, 2014 11:20 PM
To: Lua mailing list
Subject: Re: Suggestion for Lua 5.3.0 -- require search
paths If you want to add a new search directory for require you would do
so for .lua files with package.path, with package.cpath for .so or .dll files
(shared libraries that export a luaopen_*() function).
I frequently do this in a project if I'm requiring in a .lua from the same
directory:
package.path = './.lua;' .. package.path
require 'local_file'
Look at package.path, it search those directories for the file you're
require'ing in from left-to-right -- all the directories are between ; (; is the
separator)
Remember: package.path for .lua -- package.cpath for .so/.dll |