Goodbye // I'll miss you

When I started Excel::Writer::XLSX I had, more or less, a clean slate to start with. So I chose to use perl 5.10.

It was mainly because I wanted to use the defined-or operator //. There were other reasons as well but Excel::Writer::XLSX is an API heavy module and, although it may sound trivial, defined-or saved me a lot of time.

I also wanted to use some of the other Modern Perl features. In fact I would really have liked to have used perl 5.14 but I thought that was probably a step too far.

Perl 5.10 isn't exactly new. It came out around the same time that Excel 2007 and the xlsx format came out. So, I thought that it was reasonable to use a recent perl for a module targeting a recent file format.

I was wrong. Clearly organisations upgrade Microsoft Office more frequently then they upgrade perl, because most of the emails and forum posts I got were prefixed with statements along the lines of "We'd like to use Excel::Writer::XLSX but we're stuck on perl 5.8.x".

Most of the people who wrote to me were capable, and generally willing, to upgrade to perl 5.10 but for reasons related to their continued employment, couldn't. I've been in that situation myself. It isn't fair to ask people to install a 5.10 perl binary across tens of Solaris machines even if another part of the company will merrily deploy Office 2010 across hundreds of machines.

I tried to deal with these requests by maintaining a perl 5.8.2 branch on the GitHub repository. That was initially a pain to maintain but the merges got easier. However, the branch and the head weren't always in sync and I started to get bug reports for the 5.8.2 branch that might or might not exist on the master. Also, some people were unaware of the branch and did their own backport. I also started to program looking over my shoulder at the maintenance branch and thinking "Do I really need // here. If I use || I won't have to port it".

In the end I just gave up and merged the 5.8.2 branch onto the master and as of version 0.38 the minimum perl requirement for Excel::Writer::XLSX on CPAN is perl 5.8.2.

But I swear to God, if I get one single perl 5.6 support request I'll dial the whole thing all the way up to perl 5.14.


Oh well, I guess that's what your audience wants and needs. Most of my CPAN modules should work nicely on perl-5.8.x too, though I've written a little perl-5.10.x-and-above-only code too, because at one point I was going mad without named captures, and in a second case, I used Regexp::Grammars which makes use of perl-5.10.x's advanced regular expressions as well.

I once commented that “real programmers don’t write workarounds. They tell their users to upgrade their software. ”, but I didn't mean it too seriously. As a developer of FOSS, you sometimes need to adapt the code to your users.

BTW, when I first read the title, I didn't notice the “//” and so it seemed a bit weird, as if you addressed the global readers.

It is so unfair that the people who do the most for Perl are expected to have their code work on ancient versions of Perl.

I am so grateful to you for continued work on the Excel related modules.

Thank you!

I'm one of those people stuck on Perl 5.8.x who uses your modules, and I think you. We are working on getting upgraded to Perl 5.14, but there are a number of related projects involved that will take time to work through.

The title should've said: "Goodbye *for now* //, I'll miss you". Eventually people will upgrade to 5.10+.

Leave a comment

About John McNamara

user-pic Just another Perl hacker