Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

I recently bought a new Powerbook, and was looking around to see if there were any examples about using Perl with Cocoa GUI's on OS X.

Does anyone have any experience with trying this sort of thing? Any good webpages I can read on the subject?

I saw some references to CamelBones (see sourceforge), though it requires it's own runtime, which isn't that cool for distribution reasons (can't just make a PAR executable and be done with it). --DudeThatNeedsToRegister

Replies are listed 'Best First'.
Re: Perl & Cocoa
by Fletch (Bishop) on Aug 13, 2004 at 15:31 UTC

    I haven't tried to get it working yet myself, but it is possible to embed frameworks inside of an application bundle. Conceivably you could embed the CB framework inside your app and things would work just fine. See this article at cocoadevcentral.com for more details.

    Update: There's also the PerlObjCBridge module which ships with OS X; perldoc PerlObjCBridge should bring up the documentation on it, and this article at the aforementioned site covers using it; the downside is that you can't do GUI (AppKit) stuff with it directly (you could however write an ObjC front end which talks to a perl backend using distributed objects).

      Thanks for that update ++. I can't believe I didn't know about that already. Out of the loop.

Re: Perl & Cocoa
by stvn (Monsignor) on Aug 13, 2004 at 16:04 UTC
    I saw some references to CamelBones (see sourceforge), though it requires it's own runtime, which isn't that cool for distribution reasons (can't just make a PAR executable and be done with it).

    Since applications in OS X are really just fancy folders, you may be able to just include the framework. But even if you cannot, you can very easily create an Apple package, which can be installed with a few clicks.

    I haven't used Camelbones in a few versions myself, but even back in the early days of it, I was able to very easily and quickly package up my test apps using the PackageMaker app (comes with the Apple Developer Tools). I sent the package to several non-programmer friends and they installed it no problem.

    -stvn