Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW

Distribute cross-platform perl application

by true (Pilgrim)
on Apr 22, 2003 at 15:34 UTC ( #252287=perlquestion: print w/ replies, xml ) Need Help??
true has asked for the wisdom of the Perl Monks concerning the following question:

I've got these flash parsing tools written primarily in perl. They do various tasks i deem helpful and i'm trying to distribute them to as many Flash Developers as i can. My target platforms are Mac OSX, Windows, Linux.

The parsing tools use ImageMagick plus a custom module i wrote that's not worthy of CPAN. Flash developers tend to stay visual hence i want to avoid giving a four page installation manual. Not to mention how long it took me, the newbie, to proerly install ImageMagick on a non-root server etc etc. My goal is to avoid these install hassles and just give people the tool.

To date, i've got the Windows problem licked thanks to perl2exe. After learning about strict :), i can produce an executable that the Flash Developer can drag and drop files onto and the tool parses the files. Very simple to use with no install needed.

My question comes in when i look to the MacOSX paltform and Linux desktops like KDE or Gnome. I have seen that the MacOSX perl is alive but missing almost all modules (even LWP). Most Mac heads don't like the command line yet. Since OSX is Unix based. I'm hoping to find a solution to the MacOSX/Unix platform. Ideally similar to my Windows solution discussed earlier. One file the user downloads with no out-of-folder installs needed.

Any advice would be appreciated.

thanks for reading.


BTW. Image2SWF is the tool i'm trying to distribute. More info at:

2003-04-22 edit ybiC: Retitle from "Running Perl on any platform"

Comment on Distribute cross-platform perl application
Re: Running Perl on any platform
by crenz (Priest) on Apr 22, 2003 at 15:41 UTC

    For MacOS X, you could try the following approach:

    • Make an application directory (e.g. and a subdirectory lib for all the libraries.
    • Install the necessary libraries (e.g. ImageMagick) inside that directory, using e.g.
      configure --prefix=/my/path/ make make install
    • Do the same for all modules:
      perl Makefile.PL PREFIX=/my/path/ make make install
    • Put your script in there (for exact location, see below)
    • Modify your script to use your library directory:
      use lib qw(lib)
    • Put all the other necessary files (resources, icon etc.)

    I don't have an article handy that shows the structure of Mac OS X app-directories, but you might google for it or look at another app to see how it's done. The created app will look to the user as one file.

    Update: I'm not recommending this for linux because distributing compiled versions of software (ImageMagick in that case) can be problematic on linux (library issues, different kinds of processor (x86, Sparc), etc.)

Re: Running Perl on any platform
by hardburn (Abbot) on Apr 22, 2003 at 15:42 UTC

    Most Linux distros come with Perl, but you'll have to get the users to install the module, or bundle it with your application. Could do the same with Mac OS X.

    I wanted to explore how Perl's closures can be manipulated, and ended up creating an object system by accident.
    -- Schemer

    Note: All code is untested, unless otherwise stated

Re: Running Perl on any platform
by adrianh (Chancellor) on Apr 22, 2003 at 20:39 UTC

    Take a look at PAR. You should be able to use this to produce a single file install for all the platforms you're interested in.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://252287]
Approved by hardburn
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (13)
As of 2014-08-21 14:14 GMT
Find Nodes?
    Voting Booth?

    The best computer themed movie is:

    Results (136 votes), past polls