sans-clue has asked for the wisdom of the Perl Monks concerning the following question:

I wrote a simple perl script that works on win32 with ActiveState perl (default install). I added a Perl module as well. Now before I roll it to 200 PCs, the PC dude says the ActiveState footprint is too big. How can I figure out what I can delete from the ActiveState dist and have the script still work without embarking on a 100 hour interative process. Also is there a way to take this perl script and the module and create an exe out of it ? Thanks

Replies are listed 'Best First'.
Re: Paring Down Perl
by Joost (Canon) on Oct 14, 2004 at 16:52 UTC
Re: Paring Down Perl
by BrowserUk (Patriarch) on Oct 14, 2004 at 17:07 UTC

    You might consider, or suggest to your PC guy, that the application + perl be placed on a shared drive somewhere the 200 PC's can get at it and distribute a shortcut to the individual PCs. It'd save a heap of disc space at the cost of a slightly longer delay on startup.


    Examine what is said, not who speaks.
    "Efficiency is intelligent laziness." -David Dunham
    "Think for yourself!" - Abigail
    "Memory, processor, disk in that order on the hardware side. Algorithm, algorithm, algorithm on the code side." - tachyon
Re: Paring Down Perl
by jplindstrom (Monsignor) on Oct 14, 2004 at 17:38 UTC
    If you package it with PAR or PerlApp, you can also try to compress the exe file with UPX. I remember it not working with early versions of PAR, but that may work by now, so give it a try.

    /J

      It won't work with any version of PAR and won't buy you any extra compression.

        Can you justify that remark? A full Perl install, ActiveState or otherwise, is much larger than even a big PAR executable (eg, I am playing around with one right now that has an attached database and a couple dozen modules that is still only 3M). And if the original script isn't doing anything terribly tricky (and the OP says it's not) then PAR should work without any trouble at all.

Re: Paring Down Perl
by mattriff (Chaplain) on Oct 14, 2004 at 16:52 UTC
    You probably want to check out PAR, which will package everything in to an executable for you.

Re: Paring Down Perl
by radiantmatrix (Parson) on Oct 14, 2004 at 19:53 UTC

    In addition to using the PAR pp packager, you can also use ActiveState's Komodo environment to build PAR .exe files right from the IDE.

    radiantmatrix
    require General::Disclaimer;
Re: Paring Down Perl
by displeaser (Hermit) on Oct 15, 2004 at 16:01 UTC
    You might also try Tinyperl: http://tinyperl.sourceforge.net/
    it's a bit buggy but may be useful for you.

    As your script is written for Win32 if you package it into an .msi file with the activeperl dev kit you can easily distribute it (or provide it for optional install) through group policy

Re: Paring Down Perl
by Anonymous Monk on Oct 18, 2004 at 04:19 UTC
    What does this script do? It might be possible to compile to EXE via using the activestate Perl dev kit, which will compile portions of the perl interpreter so that the script can execute independant of a perl install. I've used it before, and it's super. Ben ben.chase@fairchild.af.mil