At 12:46 PM -0800 3/13/01, David J. Iberri wrote:

>What *exactly* does MacPerl do when it saves a script as a CGI script?

It makes a copy of a small application from the "MacPerl Extensions" 
folder named "CGI Script", it sets the Mac filesystem properties on 
that copy such that it runs as an application, copies the current 
script into the resource fork of that copy, and gives it the name 
that you have chosen for your CGI.

That application knows how to do a few things:

1) Receive the appropriate AppleEvents from a Mac webserver that uses 
the MacHTTP CGI convention (e.g. most Mac Webservers),

2) To parse out the appropriate arguments from the AppleEvents and 
place them where (Mac)Perl would expect to find them, had they been 
supplied by a Unix webserver,

3) To send them, along with the script and the appropriate 
AppleEvents, telling MacPerl how to run, to MacPerl,

4) To receive STDOUT from MacPerl,

5) To translate that into appropriate AppleEvents and sent them back 
to the Mac webserver.

Hope this helps.

(I also hope this is more or less correct :-)

-David Steffen-
David Steffen, Ph.D.
President, Biomedical Computing, Inc. <http://www.biomedcomp.com/>
Phone: (713) 610-9770 FAX: (713) 610-9769 E-mail: [EMAIL PROTECTED]

Reply via email to