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

Hi,
I just started to get familar with Perl on OSX. I start with a custom perl 5.8.5 and try the interaction with cocoa. But whenever I use my custom perl installation, the module PerlObjCBridge is missing. Because I didn't install it ;-) I'm pretty sure I can copy it from the system's perl, since it is perl 5.8.1, but where can I get the package? I searched search.cpan.org and developer.apple.com without any success.
I'm very new to OS X.
Boris

Replies are listed 'Best First'.
Re: PerlObjCBridge with custom perl
by tachyon (Chancellor) on Aug 29, 2004 at 14:11 UTC

    I don't use Mac OSX but I do understand module installation under Perl. The following should probably work. Anyway giving it a try will take no more than a minute or two.

    You have a 5.8.1 disto. That is binary compatible with 5.8.5 (AFAIK) and I assume that the bridge code is XS/C and has binary component. You need to cut and paste several bits from 5.8.1 to the same locations in 5.8.5.

    Here is a simulated install of this module showing what goes where:

    [root@devel3 PerlObjCBridge]# make install Installing INSTALL_ROOT/i686-linux/auto/PerlObjCBridge/PerlObjCBridge. +so Installing INSTALL_ROOT/i686-linux/auto/PerlObjCBridge/PerlObjCBridge. +bs Installing INSTALL_ROOT/i686-linux/PerlObjCBridge.pm # this is unnecessary man and book-keeping stuff..... Installing INSTALL_ROOT/man/man3/PerlObjCBridge.3 Writing INSTALL_ROOT/i686-linux/auto/PerlObjCBridge/.packlist Appending installation info to INSTALL_ROOT/i686-linux/perllocal.pod [root@devel3 PerlObjCBridge]#

    So I suggest you do a locate on PerlObjCBrige. You should find a .so .bs and .pm relative to your 5.8.1 install root in the locations shown (well probably not i686 ;-) Copy those 3 files into exactly the same path locations relative to your 5.8.5 install root. They will then be found and may/should just work.

    cheers

    tachyon

      I know, that I can copy the files, as long as the perl versions are binary compatible. But I search for a real solution. If this is not possible I go and copy the files.
      /Library/Perl/5.8.1/darwin-thread-multi-2level/auto/Foundation/Foundat +ion.bs /Library/Perl/5.8.1/darwin-thread-multi-2level/auto/Foundation/Foundat +ion.bundle /Library/Perl/5.8.1/darwin-thread-multi-2level/Foundation.pm /Library/Perl/5.8.1/darwin-thread-multi-2level/auto/PerlObjCBridge/aut +osplit.ix /Library/Perl/5.8.1/darwin-thread-multi-2level/auto/PerlObjCBridge/Per +lObjCBridge.bs /Library/Perl/5.8.1/darwin-thread-multi-2level/auto/PerlObjCBridge/Per +lObjCBridge.bundle /Library/Perl/5.8.1/darwin-thread-multi-2level/PerlObjCBridge.pm
      Boris

        Call me a bluff old pragmatist but if it was me I would try copying the files first, and if that works, search for a *real* solution at my leisure. You would be right if you thought it might well end up right on the bottom of the TODO list after a day or two. Given that it is a custom Apple module it may not be freely available. Isn't camelbones supposed to do the same sort of stuff better?

        cheers

        tachyon

Re: PerlObjCBridge with custom perl
by Solo (Deacon) on Aug 29, 2004 at 11:40 UTC
    I got 2 hits on search.cpan.org. The README.macosx states:

    Apple's PerlObjCBridge module, included with Mac OS X, can be used...

    --Solo

    --
    You said you wanted to be around when I made a mistake; well, this could be it, sweetheart.
      beside the PerlObjCBridge module there is also the foundation and 1 other that I can't remember off hand and possibly more. Check sherm pendley sourceforge project: http://camelbones.sourceforge.net/index.php I know that he compiles the whole wad for his developer distributions.
        This module was one reason for me, to give OSX a chance and buy a powerbook. I recommend it every perl user on osx.
        Boris
      I use already the PerlObjCBridge module, but I can not install it ( beside copy the files by myself ). I like to install the module PerlObjCBridge local to my homegrown perl installation. Adding the system's module path is not what I'm after.
      In CPAN words, I search for PerlObjCBridge-x.yz.tar.gz.
      Boris
        http://www.nntp.perl.org/group/perl.macosx/897. It's old, but perhaps Google groups can turn up some more recent messages from him.

        --Solo

        --
        You said you wanted to be around when I made a mistake; well, this could be it, sweetheart.