Re: Cocoa and PERL
Re: Cocoa and PERL
- Subject: Re: Cocoa and PERL
- From: "John C. Randolph" <email@hidden>
- Date: Thu, 19 Jul 2001 23:09:06 -0700
On Thursday, July 19, 2001, at 08:16 PM, Andreas Monitzer wrote:
On Friday, July 20, 2001, at 04:52 , David P. Henderson wrote:
On Thursday, July 19, 2001, at 10:25 , Kevin Ford wrote:
First off, just to make it clear, you're dealing with a total newbie
here; however, I was wondering A) is possible to wrap a PERL
script(MisterHouse) and create an interface for it in Cocoa, and B)
where I might find info on such a combination of PERL and Cocoa?
Yes, you want to use Foundation NSTask which allows you to run another
program as a subprocess of your application. Check out
<http://www.cocoadevcentral.com/> for an example of using NSTask
It's possible to embed perl into a C-app. It allows you to easily
exchange data and call perl-functions. And it's faster at runtime
(since the perl interpreter is linked with the app).
You should use NSTask only when it's really necessary (like for calling
GPL-apps from non-GPL code).
I wouldn't go that far. I'd say use NSTask whenever it's convenient.
-jcr
"This is not a book to be tossed aside lightly. Rather, it should be
hurled with great force." -Dorothy Parker