[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] Terminating MacPerl after a Droplet



Shai Spharim asked:

>I've written a script and saved it as a Droplet.
>Now whenever I run it MacPerl launches and stays open after the 
>droplet has died.
>
>What i would like is that MacPerl would also quit after the droplet 
>- unless it was already open when the droplet started.
>
>Is this possible?

Almost/Sort Of/Not Quite :-)

Add the line:

MacPerl::Quit(3);

....somewhere in your script where it will run (e.g. near the top), 
and MacPerl will quit after running the CGI if it is the first 
program run by MacPerl, but not if you have previously run another 
program with MacPerl.  Thus, you can open MacPerl, do nothing, and 
run the droplet and MacPerl will quit (not what you asked for). 
However, if you open MacPerl, run ANOTHER script, then run the 
droplet, MacPerl will NOT quit.  (It will also quit if MacPerl wasn't 
open at all when you run the droplet.)

Documentation on MacPerl::Quit() (there are other options) is in the 
file macperl.pod which comes with the MacPerl distribution (readable 
with the included shuck program) and is covered in Chapter 12 of 
"MacPerl Power and Ease".

Hope this helps.

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

# ===== Want to unsubscribe from this list?
# ===== Send mail with body "unsubscribe" to macperl-request@macperl.org