views:

1949

answers:

3

People also often ask "How can I compile Perl?" while what they really want is to create an executable that can run on machines even if they don't have Perl installed.

There are several solutions, I know of:

  1. perl2exe of IndigoStar It is commercial. I never tried. Its web site says it can cross compile Win32, Linux, and Solaris.
  2. Perl Dev Kit from ActiveState. It is commercial. I used it several years ago on Windows and it worked well for my needs. According to its web site it works on Windows, Mac OS X, Linux, Solaris, AIX and HP-UX.
  3. PAR or rather PAR::Packer that is free and open source. Based on the test reports it works on the Windows, Mac OS X, Linux, NetBSD and Solaris but theoretically it should work on other UNIX systems as well. Recently I have started to use PAR for packaging on Linux and will use it on Windows as well.

Other recommended solutions?

A: 

You could use the perlcc tool that's shipped with most distributions of Perl. I've also found both perl2exe and Active State's Perl Dev kit useful for shipping Perl applications.

Bruce
perlcc doesn't really work, and it has been like that for a long time. PAR is the way to go.
asksol
perlcc mostly does not work (see perldoc perlcc) and has been removed from perl 5.10
szabgab
+6  A: 
tsee
A: 

I'm a Perl newbie and I just downloaded Cava Packager and that's the only one I found working. I've tried ActiveState 5.10.1005 and Strawberry Perl with PAR-Packager on Windows XP. pp just hangs in mid-stream and no executables created.

Cava provides the only solution to creating exe on Windows so far. Thks.

mcwong