Update on my last rant (Perl PAR::Packer sucks) – it got better, thanks to Håkon Hægland on Stackoverflow

I was quite frustrated, because I really needed to be able to deploy a utility to about 30 people, and I could not see any way out.

I’m not sure, but I think the reason it didn’t work is that the author of PAR::Packer thinks including shared libraries are out of scope. For all I know, they are really out of scope. But I needed the shared SSL library to be able to perform the task.

I put a request out on Stackoverflow, and Håkon took it as a challenge. He was successful, and I am hugely thankful for that.

My failure was not seeing that App::PP::Autolink was a thing. Håkon asked the maintainer of PAR::Packer (Roderich Schupp) the question I didn’t think I could ask. Roderich knew the answer, and supplied it. Håkon used that to educate the world (and me) that yes there is an answer: App::PP::Autolink.

Thank you, Håkon. You made my world a better place. I hope your work makes many people’s world a better place.

Wow Perl PAR::Packer sucks

I presented a problem to my boss, where I need to let about 30 desktop technicians run some code I’ve written. My boss said when he is in that position, he writes it in PowerShell, and uses PS2EXE. This is good idea. I found that in the Perl world, the same idea is in PAR::Packer.

A super simple script, running on my Linux box, takes less than one second to run. Open up an SQLite database, fetch all 20 records, sort them, print them. Simple. Less than one second.

The Windows .exe version takes 19 seconds.

Every. single. run.

There is no way that the on-call technicians who have to run the scripts I’m writing are going to be happy with that. And it would make me feel bad, inflicting that sort of this-is-time-of-my-life-that-I-am-not-getting-back on some poor soul who got a call at two in the morning, to deal with whomever for whatever.

Normally, on Windows, I used WinBatch. Did so for 20 years. But alas, WinBatch was always a for-pay product, and eventually hobbyists wrote AutoHotKey (or was it Auto-It?) (for free) to do everything WinBatch does. Also, the real goal was to take my Perl scripts that use REST to get and put JSON or XML at a web service. WinBatch has lots of old extenders, but rarely any new ones. I don’t know of a REST extender for WinBatch. I don’t know of anything in WinBatch that does what DBI does in the Perl world. The WinBatch answer is to install MS Access (or whatever) and use COM to drive the actual database client. Avoiding installing software is part of the goal here. I need something That Just Works.

And preferably works in a second or two; not twenty.

I’ve got REST modules written in Perl. I’ve gotten far enough in my Perl skills to put standardized code in modules, and then use those modules. But that meant putting modifying the search environment for finding modules. Guess what doesn’t work with PAR::Packer?

Okay, crap, I can move all my modules into the root directory where my scripts are. This is stupid, but I’ll do it.

And then I find that the execution speed of even a simple script is terrible.

Searching for a solution, of course the answer is “You’re doing Perl wrong, if you don’t want to install an entire development environment on every workstation”.

Well, thanks for nothing. Apparently I need to give up Perl and start learning PowerShell. PowerShell does rather look like Perl, so maybe it won’t be too terrible of a transition.