This is the mail archive of the
kawa@sourceware.org
mailing list for the Kawa project.
Re: import path vs CLASSPATH
On 08/02/17 21:41, Per Bothner wrote:
Depends what you mean by "the program". The path is relative to the
*importing* module.
I.e. the source file that contains the import or require form.
Yes, this makes more sense now. It is quite logical, although I did get
caught out even after looking at the manual - by thinking the
import.path was analogous to CLASSPATH.
Perhaps changing "If the resulting filename is relative, then it is
resolved relative to the current root."
adding ", which is derived from the name of the source file containing
the import/require"
might make it clearer?
That would help make things clearer. I also think the point should be
flagged up earlier - the third paragraph could include a similar phrase:
"Each path element is combined ... to produce a filename; relative path
elements are /relative to the source file containing the import/require/."
--
Peter Lane
http://peterlane.info/scheme.html