Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • Although not a CamelBones app, Blue Coconut [husk.org] includes a lot of Perl libraries. I use the following Shell Script step in Xcode to use PAR to bundle the required resources:

    pp -I ./perl_lib -p -o BlueCoconut.par BlueCoconut.pl && unzip -o BlueCoconut.par -d par && rm -rf build/Blue\ Coconut.app/Contents/Resources/perl_lib && mv par/lib build/Blue\ Coconut.app/Contents/Resources/perl_lib && rm -rf par

    Step by step: use pp (PAR packager) to make a PAR file for BlueCoconut.pl;

    • I did think about PAR, but there's a chicken and egg problem with it. Since you can't pp to create a .pm that contains all your modules, only pp to create an exe, you need to to distribute PAR with your application. Same problem, different strokes.
      • Ah, but the way I do things doesn't require PAR to be shipped, because I unpack the PAR zipfile out to the application's bundle. All I need to do to make sure that the application can find the libraries is to make sure that's copied alongside the perl_lib folder in the resources, and then modify @INC:

        BEGIN {
            my $lib = File::Spec->catfile($Bin, "perl_lib");
            unshift @INC, $lib;
        }


        Also, the use of (I think) -I means that I don't get a full executable, but a zipfile. (I really s
  • Matt - great write up. Thanks! Is it OK with you if I copy it to the CB site? I'll give you credit, naturally. Or if you'd prefer, I'll simply add a link to this journal entry.

    BTW, the first step (removing and replacing the framework, and adding the "copy files" build phase) shouldn't be necessary with the latest 1.0 beta, released last week. I updated the project templates to use the embedded framework by default - I'll double-check to verify that the latest templates are included in the package.