22
votes

I want to write a piece of software which is essentially a regex data scrubber. I am going to take a contact list in CSV and remove all non-word characters and such from the person's name.

This project has Perl written all over it but my client base is largely non-technical and installing Perl on Windows would not be worth it for them.

Any ideas on how I can use a Perl/Python/Ruby type language without all the headaches of getting the interpreter on their computer?

Thought about web for a second but it would not work for business reasons.

9

9 Answers

23
votes

You can use Perl Archive Toolkit to bring a minimal perl core + needed modules + your Perl program with you.

And you can even convert it using PAR Packer to a windows exe file that will run just like any other program, from an end user's perspective.

31
votes

You can get Windows executables in all three languages.

8
votes

Using PAR, the Perl Aachiver has already been mentioned in other answers, and is an excellent solution. There's a short tutorial on building executables using PAR that was published as a Perl Tip last year.

In most cases, if you have PAR::Packer already installed on your build system, you can create a stand-alone executable with no external dependencies or requirements with:

pp -o example.exe example.pl

In most cases PAR will do all the hard work of determining your module dependencies for you, but if it gets anything wrong there are additional command line options you can use to ensure they get included. See the pp documentation for more details.

All the best,

Paul

6
votes

Are you sure there is a headache? ActivePerl and Strawberry Perl are dead easy to install on Windows with just a couple of mouse clicks. Python is just as easy to install from what I hear.

Have you tried installing any of those to see how easy it is? If those are hard for your customer, I don't see how giving them a script to run is going to be easier.

Or, maybe you can use something like a Docker image for Perl or provide it as a web service instead of an application.

3
votes

You could convert the script to an executable. In Python and Windows you can easily do that with py2exe. There are similar solutions for Perl and Ruby, but I believe py2exe is both free and reliable.

2
votes

A non-technical audience? You'll also want some sort of basic user interface, probably of the `graphical' type. You might try wxPython, which can be packaged into a Windows executable with py2exe and into a Mac application with py2app.

1
votes

Shoes can make exe's, and binaries for other platforms as well, and you get an integrated GUI.

1
votes

Ruby has the OCRA program that packages everything up into a nice neat .EXE file. The RubyScript2EXE program is no longer maintained, so this would be the better solution.

0
votes

"installing Perl on Windows would not be worth it for them" Really? It's that complex?

Python has a simple .MSI that neatly installs itself with no muss or fuss.

A simple application program is just a few .py files, so, I don't see a big pain factor there.

You know your customers best.

I find that the following isn't so bad. And it's much easier to support, since your upgrades will just be a single .MSI with simple, easy-to-live with source.

1) double click this .MSI file to install Python (or Perl or whatever)

2) double click this other .MSI to install the good stuff