How Well Does Perl2exe Work for Large Applications?
bobm writes "One of the issues with not using the 'standard' MS tools (VC, VB, etc) is that you face the possiblity of having to load a lot of DLL's to support an application. I'm in this boat with a Perl app I would like to migrate to a couple of Windows 2000 servers. It's a simple app that runs well on our Unix boxes and if it wasn't for the overhead of having to install perl and all of the required modules, it would be a no brainer. However I just stumbled upon Perl2Exe at Indigostar.
A small app worked great and I'm wondering if anyone else has used it and how large of an app have they released? Any other pointers and info on pertinent issues would be helpful too."
I've used it to build a moderately sized installation application that was distributed to clients to install our huge application. I had mixed results.
Main problem was licensing. Because it was an installation app, the Build/CM team was responsible to maintain it. IIRC, the license was tied to a given username and host. So, developers can't build the installer themselves, the CM team must do it on request, or setup a shared perl2exe user for everyone on a build server somewhere. Developers, if they want to fix it, must go and work on the shared server. Pain in the ass.
The other issue was lack of Perl know-how. When the compiler complained, I'd have ten people at my desk while I tried to explain how to setup @INC corrrectly.
Seems like a _very_ small shop produces it, and is a little kludgey. Overall though, if my team was just me or a few Perl savvy people, I would recommend it.
As an aside, my reasons behind using perl2exe were:
1) perlcc didn't seem to work at all, and I didn't have the time to muck with it. Has anyone gotten this to work for more than just small or test programs?
2) (and most obnoxious, at least with 5.003(?)) Perl is a pain in the ass to deploy. Licensing issues didn't allow us to distribute ActiveState on NT, and Perl really wants to be compiled on the target machine for Solaris. Compiling a distribution on Solaris hard-codes the prefix-dir, so it expects the target machine to have the same dir structure--which is in violation of my requirements. I emailed the mailing list and got a reply from non other than Randall Schwarz, who basically said (heavily paraphrased), "Yeah, that sucks. Someone's going to fix it eventually." The only solution I could come up with in a short amount of time was to write a wrapper script that mucked with @INC and included paths from the environment before execing anything else.
I love the language, but this is why I don't use it. You can't depend on everyone having installed Perl + all your needed PMs themselves, and its not worth trying to automate it for them. IMHO, its the downfall of the language.
We wanted to have Perl installed with our large Java system to help in performing scripting type tasks, but it was way too big of a pain. Oh well...
Don't blame me, I get all my opinions from my Ouija board.
For the record, I recommend using Perl2exe and avoid installing the Perl runtimes!
I've used Perl2exe for, admitidally smaller programs, and it works great. Check out the options, you can either compile into one large exe, or use one (yes, one) additional dll and reduce the size of the program considerably.
So basically, you have the best of both worlds. If it's only ever going to be one application, do a full binary and deal with the size. If there could be one or more, then consider using the dll.
Yes, there are 2 downsides, one is the size of the application - but compaired to the size and hassle of installing the whole Perl distribution for every machine, it's a no-brainer.
The other being the ability to edit the code. Well if there are individuals out there who need to edit it, they'll have the perl runtimes and you can just give them the source. But giving normal users carte blanche to edit the code is asking for hundreds of support calls.
If options are needed code them in rather than get them to edit the source.
Avantslash - View Slashdot cleanly on your mobile phone.
Thus, I tried Perl2exe. There were two parts that really impressed me. First, it included all of the packages that I was using, including Perl/TK (as I said, Windows users. The looked at my initial console version like it was in Hieroglyphics.) I was also impressed that the program and dictionary could still be compressed to fit on a floppy, which was a huge relief from having to Perl burn CDs for all of the users. In the end, I would say that, if you are porting a simple maintenance script or other non-time critical application to the Win2k servers, by all means go with Perl2exe. However, if this is a critical part of your new Buzzword Server System, then read a post from someone who knows better.
Depending on your application, it can be an enormous help. Building the apps fully static lets you work on your application in perl, edit, run, modify, debug, enhance, run, etc. on your development machine, then slap out a binary that can be run on any other windoze machine by simply getting that machine access to the executable. You're not messing with the registry, sticking DLLs all over the place, and taking up disk space with a development system when all you need is to run the program you wrote with your development system. Sure, the individual binary is enormous, for what it does, at least, at small amounts of code (as the app grows, the overhead shrinks into insignificance).
I had to write and run an application on a bunch of windoze boxen for a client a couple of years ago. I was not permitted to install anything. I got it working in perl, used an eval copy(it wasn't a long-term application) of perl2exe, got the job done, and everybody was happy. Sounds like your app is similar.
One caveat: the big static binaries tend to load kind of slow, but as you know, everything has tradeoffs.