|
Posted by Bondo on May 17, 2005, 5:44 pm
Please log in for more thread options
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
severe difficulties!
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?
Thank you,
Joachim
|
|
Posted by Sherm Pendley on May 17, 2005, 9:32 pm
Please log in for more thread options
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.pm
ObDisclaimer: 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
|
|
Posted by Sisyphus on May 18, 2005, 2:10 pm
Please log in for more thread options
> 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?
>
Sounds to me like a job for the PAR module (available from cpan).
There's a PAR mailing list, too. (See http://lists.perl.org .)
Cheers,
Rob
|
|
Posted by Bondo on May 18, 2005, 8:00 am
Please log in for more thread options
Thank you for your replies. I will look further into these 2
technologies. Via the PAR website I found PerlWrapper
(http://web42.com/software/perlwrapper/), which might also be a
possibility...
Cheers,
Joachim
|
| Similar Threads | Posted | | Loading Perl Modules from same directory as script | February 13, 2006, 5:27 pm |
| Loading Perl Modules from same directory as script | February 13, 2006, 5:35 pm |
| ActivePerl error message? Router script. Please help.Newbie | May 17, 2006, 9:58 am |
| Newbie on using Modules | June 2, 2006, 12:28 pm |
| Newbie: Installing Modules | February 22, 2007, 5:42 am |
| Executables out of perl script? | April 20, 2006, 7:30 am |
| Executables out of perl script? | April 20, 2006, 7:30 am |
| Executables out of perl script? | April 20, 2006, 7:56 am |
| Help Eventlog Perl Script | May 28, 2007, 11:27 am |
| New to perl module would like to learn how to run this script. | January 18, 2005, 11:29 pm |
|