Re: Cocoa and PERL
Re: Cocoa and PERL
- Subject: Re: Cocoa and PERL
- From: Andreas Monitzer <email@hidden>
- Date: Fri, 20 Jul 2001 05:16:08 +0200
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).
andy
--
Discussion forthcoming.