I just uploaded Mac::Growl to the CPAN.  It is an interface to Growl.

        http://growl.info/

I mention it not because you should use Growl -- though you should -- but
because it has some interesting and useful examples of how to use
PerlObjCBridge in it.

        http://search.cpan.org/~cnandor/Mac-Growl/lib/Mac/Growl.pm

The module actually uses three methods: PerlObjCBridge, Mac::Glue, and
AppleScript.  This way it works out of the box, pretty much anywhere.  On
initialization it sees if PerlObjCBridge (Foundation) is available, and if
so, it uses that to send messages directly to the Growl framework.

If that's not available -- because you built your own perl or somesuch --
it tries Mac::Glue, and then falls back to AppleScript (trying one of three
AppleScript modules, before reverting to system('osascript', ...)).

Anyway, over on use.perl.org I found some info for loading other Frameworks
into Perl:

        http://use.perl.org/~pemungkah/journal/23339

I used this to load the AppKit framework, which, along with the
CoreFoundation framework, I used to send data and images to Growl.  I know
almost nothing about ObjC or Cocoa, but I got it to work, and figured it
might be of some interest.

(Also perhaps of interest: the Makefile.PL automatically creates a glue for
Growl, for Mac::Glue to use, so the user doesn't have to ... feel free to
take that or give tips to me on how it can be improved.)

-- 
Chris Nandor                      [EMAIL PROTECTED]    http://pudge.net/
Open Source Technology Group       [EMAIL PROTECTED]     http://ostg.com/

Reply via email to