Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Perl2exe aggrivations

by Cybercosis (Monk)
on Jun 12, 2000 at 20:37 UTC ( [id://17734]=perlquestion: print w/replies, xml ) Need Help??

Cybercosis has asked for the wisdom of the Perl Monks concerning the following question:

This probably isn't *directly* related to perl, but perl2exe and I are having issues. After giving up on installing the M$ installer to install activeperl, I ran my script through my (currently unregistered) version of perl2exe. However, it only seems to do what I want it to on my laptop, which doesn't do anybody any good. All it does is run my little timer routine, which is the single most useless part of my program. Any ideas?
~Cybercosis

Replies are listed 'Best First'.
(jcwren) Re: Perl2exe aggrivations
by jcwren (Prior) on Jun 12, 2000 at 23:38 UTC
    Perhaps an answer with a bit more information would be helpful. Perl2EXE is still pretty rough. I've played around with it some, and had trouble compiling all but the most simple applications. There seem to be a bunch of modules it doesn't work with, in particular the CGI module.

    At the moment, there doesn't seem to be much of a reason to compile Perl scripts, with the possible exception of distributing applications to Windows desktops without installing a full version of Perl.

    Compiled support is supposed to be better under 5.6. My experience is all under 5_005.63.

    Don't expect much faster run times, or smaller footprints. Even small apps compiled to around 1MB (Perl hauls in a lot of stuff).

    Also, you might think about why you really want to compile Perl, and see if there's away around it.

    --Chris
Re: Perl2exe aggrivations
by ase (Monk) on Jun 13, 2000 at 01:48 UTC

    I have been using ActivePerl and Perl2exe for over a year with no problems. I haven't tried ALL the modules but all the one's I've needed worked. If you read the Perl2Exe documentation (which I admit is a little cryptic at times), There are a lot of potential issues to watch out for:

    • Make sure the version of Perl you're using is supported by the version of Perl2exe you're using.
    • The target machine will require some files, besides the .exe file you made. Perl2exe should tell you which one's are needed (and put them in the directory) when you run it.
    • One in particular that got me is that perl2exe sometimes requires extra use statements (especially for Tk submodules)
    • Older versions of Win95 will require DCOM to run the resulting exe.

    That's not everything, but it's what caused the most problems for me.

    Instead of remembering how exactly I got a program to go .exe every six months when I update it. I write a batch file:

    perl2exe -tiny -gui ts.plx
    That's a pretty basic one -- they can get pretty complex. The -gui is for Tk apps (gets rid of ugly dos window, but you lose visibility of STDOUT) and the -tiny (registered version only) splits the program into multiple DLL's to help start up time.

    Here's a header for one of my larger programs (1000+ lines) that converts pretty easily.

    use SDBM_file; use Fcntl; use FILE::DosGlob; # perl2exe use File::DosGlob 'glob'; # override CORE::glob use Tk 8.0; use Tk::Menu; use Tk::Menu::Item; require Tk::Dialog; use Win32::API; use Win32::SerialPort;
    Hope this helps.
Re: Perl2exe aggrivations
by Anonymous Monk on Jun 13, 2000 at 00:03 UTC
    <rant target='perl2exe authors' strength='100%'> I absolutely hate perl2exe. It seems good but never works as you expect and is an absolute pain to use. Someone please make a decent version. </rant>

    I can't see why you had such a problem with the installer for ActivePerl, it worked fine for me. I recommend re-reading the documentation. Don't bother writing to ActiveState, it'll be a month (literally) before they reply. As far as I know, you need Perl installed on your machine for Perl2Exe to work!

    ActiveState have a prog called 'PerlApp' which lets you compile -- but it is not free (thought: can they do that under the GPL?).

    Perl does need a compiler, IMHO. As for the Perl to C compiler, I really think it is a disaster. It produced code that caused compiler errors!

      Luckily, stuff for or written with Perl is free from the virus that is the GPL - most stuff uses the Artistic license or "the same terms as Perl", which is either Artistic or GPL, whatever (the user) you want.

      Without going into the various definitions of "freedom", I guess that ActiveState must make money somewhere, and while employing one of the best Perl developers surely gives them a boost in the consulting business, I don't see why they should reap some money from those who need Perl running on a machine but are to cheap to move a full Perl installation over there ;).

      «…Don't bother writing to ActiveState…»

      Probably this has something to do with Plans & Pricing.

      «The Crux of the Biscuit is the Apostrophe»

Re: Perl2exe aggrivations
by httptech (Chaplain) on Jun 13, 2000 at 03:42 UTC
    I've noticed an insane little quirk in perl2exe - I have a program that launches another commandline binary indirectly through a module I didn't write. It works fine on my computer as a .pl script, and also as a .exe script, compiled with -gui or without.

    On my boss's computer, it works when compiled to .exe, but only if I compile it without -gui. Exact same code, and it does run the rest of the program fine both ways, but for some reason on his computer it will not run the 3rd party binary unless that DOS window is present. Weird.

RE: Perl2exe aggrivations
by BigJoe (Curate) on Jun 13, 2000 at 01:45 UTC
    I don't have any info on the perl2exe but I, also couldn't get the ActivePerl (build 613) to install correctly in IIS 3.0 and 4.0 . I ended up installing build 522 which has worked fine on the IIS 4 but with 3 you need to copy perl.exe from the NT resource kit.

    It seems to work pretty smoothly on each machine.

A reply falls below the community's threshold of quality. You may see it by logging in.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://17734]
Approved by root
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others perusing the Monastery: (3)
As of 2024-04-25 23:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found