[plt-scheme] mzc question: module paths

From: Paul T. Graunke (ptg at ccs.neu.edu)
Date: Tue Sep 17 15:25:00 EDT 2002

The program needs to specify the language it is written in, namely
mzscheme.

(module cgi-test mzscheme
  (require (lib "cgi.ss" "net")  (lib "xml.ss" "xml"))
  ...)

Paul
> 
>   For list-related administrative tasks:
>     http://list.cs.brown.edu/mailman/listinfo/plt-scheme
> This is a multi-part message in MIME format.
> 
> ------=_NextPart_000_00F1_01C25E58.329E66D0
> Content-Type: text/plain;
> 	charset="iso-8859-1"
> Content-Transfer-Encoding: quoted-printable
> 
> I'm trying to use mzc to embedded a module in MrScheme:
> 
>     mzc --exe cgi-test  cgi-test.scm
> 
> The error message is bad module path in require ...
> 
> I didn't see a command line flag for setting the module
> path root directory.   Is there an environment variable
> setting that handles this?  Or do I have to hard code
> absolute module paths in my source?
> 
> ; cgi-test.scm  source
> 
> (module cgi-test
> 
> (require (lib "cgi.ss" "net")  (lib "xml.ss" "xml"))
> 
> (output-http-headers)
> 
> (write-xml/content=20
>  (xexpr->xml
>    '(html
>       (title "My First CGI Web Page")
>       (body=20
>    (h1 "Hello World")))))
> )
> 
> Thanks!
> 
> John
> 
> 
> ------=_NextPart_000_00F1_01C25E58.329E66D0
> Content-Type: text/html;
> 	charset="iso-8859-1"
> Content-Transfer-Encoding: quoted-printable
> 
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
> <HTML><HEAD>
> <META http-equiv=3DContent-Type content=3D"text/html; =
> charset=3Diso-8859-1">
> <META content=3D"MSHTML 6.00.2600.0" name=3DGENERATOR>
> <STYLE></STYLE>
> </HEAD>
> <BODY bgColor=3D#ffffff>
> <DIV><FONT face=3DArial size=3D2>I'm trying to use mzc to embedded a =
> module in=20
> MrScheme:</FONT></DIV>
> <DIV><FONT size=3D2></FONT>&nbsp;</DIV>
> <DIV><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp; mzc --exe =
> cgi-test&nbsp;=20
> cgi-test.scm</FONT></DIV>
> <DIV><FONT size=3D2></FONT>&nbsp;</DIV>
> <DIV><FONT size=3D2>The error message is bad module path in require=20
> ...</FONT></DIV>
> <DIV><FONT size=3D2></FONT>&nbsp;</DIV>
> <DIV><FONT size=3D2>I didn't see a command line flag for setting the=20
> module</FONT></DIV>
> <DIV><FONT size=3D2>path root directory.&nbsp;&nbsp; Is there an =
> environment=20
> variable</FONT></DIV>
> <DIV><FONT size=3D2>setting that handles this?&nbsp; Or do I have to =
> hard=20
> code</FONT></DIV>
> <DIV><FONT size=3D2>absolute module paths in my source?</FONT></DIV>
> <DIV><FONT size=3D2></FONT>&nbsp;</DIV>
> <DIV><FONT size=3D2>; cgi-test.scm&nbsp; source</FONT></DIV>
> <DIV><FONT size=3D2></FONT>&nbsp;</DIV>
> <DIV><FONT face=3DArial size=3D2>(module cgi-test</FONT></DIV>
> <DIV>&nbsp;</DIV>
> <DIV><FONT face=3DArial size=3D2>(require (lib "cgi.ss" "net")&nbsp; =
> (lib "xml.ss"=20
> "xml"))</FONT></DIV>
> <DIV>&nbsp;</DIV>
> <DIV><FONT face=3DArial size=3D2>(output-http-headers)</FONT></DIV>
> <DIV>&nbsp;</DIV>
> <DIV><FONT face=3DArial size=3D2>(write-xml/content=20
> <BR>&nbsp;(xexpr-&gt;xml<BR>&nbsp;&nbsp;=20
> '(html<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (title "My First CGI Web=20
> Page")<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (body <BR>&nbsp;&nbsp; (h1 =
> "Hello=20
> World")))))<BR>)</FONT></DIV>
> <DIV><FONT size=3D2></FONT>&nbsp;</DIV>
> <DIV><FONT size=3D2>Thanks!</FONT></DIV>
> <DIV><FONT size=3D2></FONT>&nbsp;</DIV>
> <DIV><FONT size=3D2>John</FONT></DIV>
> <DIV>&nbsp;</DIV></BODY></HTML>
> 
> ------=_NextPart_000_00F1_01C25E58.329E66D0--
> 



Posted on the users mailing list.