Wednesday, July 16, 2008

Perl Packagers

A few months ago I started work on a Perl version of a protocol test app, the original one was written in C and while we have the source code my network C was never very good, but I can handle Perl and protocols so I changed it.  Basically there are two scripts, one that sets up a dummyServer (listener) and another that is a dummyClient (sender).  The sender connects to the listener, sends a few lines of data and disconnects.  Short and simple because all we are doing is checking that the connections are detected, and where the connections come from, because that is what the product does.  Now this worked fine for awhile, but now we are detecting connections over IPv6, and that necessitated something else, and since I couldn't work in C (yet) I did this in Perl and it was a good experience.  I got to learn alot more about networks and protocols, and how DNS will work on our lab network, which I had no idea was limited.

Now that the scripts are done I then discover our product likes to ignore a lot of Perl scripts, good for testing but not good in this case, so rather than try to hack the product to make it recognize these scripts I am looking at changing the scipts into executables.  This has been more fun.  Since initially my work is done on Windows, so I can use SlickEdit, I tried buildind the various Perl Package Utilities on my Windows 2003 machine, what I encountered is noted here.

Perl2EXE, while nice, does not give me what I want, and sadly also does not install properly on my machine.  Giving me all kinds of weird Mac::InternetConfiguration errors, that seemingly a lot of people get, but somehow get past by installing older versions of certain Perl libraries or somehow ignoring them.  I can't seem to ignore them, and honestly, if I need to go through these weird kinds of hoops to get this working on a Windows machine, I'd rather do it on Unix.

PAR is a good alternative, but I want these to be executables not PAR files that I need to run individually, so while it was fine many versions ago with the recent split to have PAR and the Perl Packager (pp) in different distributions I have to install it and the PAR:Dist that gets me the Perl Packager I need.  On Windows I get loader errors with the PAR::Dist, which many have gotten but somehow gotten past awhile ago, there are some sites that list instructions on how to install the Packager, but some are woefully out of date or had steps which did not work for me.

pp - the Perl Packager is the one I am in the midst of using, but as I am now in the middle of adding this to one of my Unix machines (I have AIX, HPUS, Linux and Solaris available) once I get it working then I will know how things are going.

Perl is always fun, and I am always getting into something new.  Never a dull moment.