[plt-scheme] dynamic require

From: Hans Oesterholt-Dijkema (hdnews at gawab.com)
Date: Mon Jun 6 20:17:46 EDT 2005

>...and passing a path to `dynamic-require' should work, although the
>path must be absolute. (Use `path->complete-path' to explicitly convert
>a relative path to an absolute path.)
>
>  
>
With mzscheme 299.100, I get an error when I pass an absolute path to 
dynamic-require.
This is why I'm rewriting the path to a relative one. :-(.

See below:

*******************************************************
Welcome to MzScheme version 299.100, Copyright (c) 2004-2005 PLT Scheme, 
Inc.
 > (dynamic-require "d:/build/log/log4scm.scm" 'log-debug)
 > standard-module-name-resolver: expects argument of type <module path 
(relative string form must contain only a-z, A-Z, 0-9, -, _, ., /, and 
space, with no leading or trailing /)>; given "d:/build/log/log4scm.scm"

*******************************************************
hdijkema at LPW0251 /d/build
$ mzscheme
Welcome to MzScheme version 299.100, Copyright (c) 2004-2005 PLT Scheme, 
Inc.
 > (dynamic-require "log/log4scm.scm" 'log-debug)
#<procedure:log-debug>
 >


>When `dynamic-require' gets a path (as opposed to a string), it treats
>it as a filesystem path, as opposed to a URL-like path.
>
>To provide a string as a path to `dynamic-require', you can use a
>quoted `file' form, usually constructed like this: `(file ,str).
>
>I may misunderstand your goal, but my guess is that passing a path
>value to `dynamic-require' is the best thing in this case.
>
>Matthew
>
>  
>



Posted on the users mailing list.