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

Re: [MacPerl-WebCGI] dev with bbedit & remote server



At 11:15 AM -0900 12/8/99, Ryan Stanley wrote:
>>
>> Ryan Stanley skrev/wrote:
>>> While the CGI is running on the server, if I try to export on top of it I
>>> get a MacOS error (-47) because the file is in-use. I don't mind that the
>>> CGI automatically quits after a period of time... but is there anything I
>>> can do so I can re-export a script that is running? (aside from
>>>exporting it
>>> with a different filename)
>>
>> use an (applescript or whatever) cgi to put it in the trash
>> Christian
>>
>
>Ahh good idea... does anyone have such an applescript? Or know how in
>MacPerl I could instruct the script to put itself in the trash or even
>execute another script once its done doing its thing?
>

The applescript is trivial:
#perl!
MacPerl::DoAppleScript(q{tell application "Finder" to
	move file "WebServer:WebStar:cgi-bin:myPerl.acgi" to trash});

__END__

You could also just unlink the file yourself in perl.  But I have no idea
how MacPerl handles a script unlinking itself during runtime?  I *assume*
it Does The Right Thing, but I don't know what that thing is.

-Jeff Lowrey



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