Re: Newbie: Bundling Perl script and modules in a Mac OS X app?
- From: Sherm Pendley <spamtrap@xxxxxxxxxxx>
- Date: Tue, 17 May 2005 20:32:51 -0400
Bondo wrote:
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.
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:
MyApp.app/
Contents/
Resources/
5.6.0/
darwin/
auto/
MyModule/
MyModule.bs
MyModule.bundle
MyModule.pm
5.8.1/
darwin-thread-multi-2level/
auto/
MyModule/
MyModule.bs
MyModule.bundle
MyModule.pm
5.8.6/
darwin-thread-multi-2level/
auto/
MyModule/
MyModule.bs
MyModule.bundle
MyModule.pmObDisclaimer: I wrote CamelBones, so I won't even pretend to be objective about it. ;-)
sherm--
-- Cocoa programming in Perl: http://camelbones.sourceforge.net Hire me! My resume: http://www.dot-app.org .
- References:
- Prev by Date: Newbie: Bundling Perl script and modules in a Mac OS X app?
- Next by Date: Re: Newbie: Bundling Perl script and modules in a Mac OS X app?
- Previous by thread: Newbie: Bundling Perl script and modules in a Mac OS X app?
- Next by thread: Re: Newbie: Bundling Perl script and modules in a Mac OS X app?
- Index(es):
Relevant Pages
|
|