Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
May 17, 2005, 9:44 pm
rate this thread
Is it possible to bundle a Mac OS X application with a Perl script and
a number of required modules, stored in the application package (folder
hierarchy) - and then, from within the application, running the Perl
script that's relying on these modules?
Ideally I would like the application to include the required modules.
The reason being that the average user would have difficulties
downloading, building and installing the 15-20 modules. Even I have
I've tried to install these modules, and most of them seem to accept an
alternate location, using the PREFIX= in the `perl Makefile.PL' call,
but some don't. I hope to be able to solve this by contacting the
developers of the failing packages.
Assuming I successfully build and install the modules in the alternate
folder, will I be able to move the folder hierarchy (by moving the
application to another machine e.g.) at a later time, and then just
adjusting the perl -I parameter accordingly?
Re: Newbie: Bundling Perl script and modules in a Mac OS X app?
Have a look at CamelBones: <http://camelbones.sourceforge.net
When a CamelBones app runs, the Resources/, Resources/$version, and
Resources/$version/$architecture folders within the .app bundle are
added to @INC. So, you can bundle portable pure-Perl modules, modules
that require a specific Perl version, and XS modules that require a
specific version and architecture in your .app bundle.
This is necessary because different versions of Mac OS X ship with
different Perls - 5.6.0 with Jaguar, 5.8.1 with Panther, and 5.8.6 with
Tiger. So, for instance, if you wanted to include an XS module that
would run on all three versions, you'd wind up with a folder hierarchy
that looked in part like this:
ObDisclaimer: I wrote CamelBones, so I won't even pretend to be
objective about it. ;-)
Cocoa programming in Perl: http://camelbones.sourceforge.net
Hire me! My resume: http://www.dot-app.org
- » HTML::TreeBuilder eating my entities using perl 5.8.x
- — Next thread in » PERL Modules Announcements