Spreadsheet::WriteExcel Perl version support

259 views
Skip to first unread message

bob

unread,
Oct 11, 2011, 9:25:13 AM10/11/11
to Spreadsheet::WriteExcel
John,
What is the oldest version of Perl we can use to run
Spreadsheet::WriteExcel?
Somewhere in your postings I thought I saw a reference to support for
Perl 5.8 .

Thanks again for all of your hard work.

Bob W

bob

unread,
Oct 11, 2011, 9:30:01 AM10/11/11
to Spreadsheet::WriteExcel
Sorry John, my brain was not in gear yet.
I meant to ask what version of Perl is required for
Excel::Writer::XLSX

Thanks

jmcnamara

unread,
Oct 11, 2011, 9:54:58 AM10/11/11
to Spreadsheet::WriteExcel
On Oct 11, 2:30 pm, bob <bo...@acegroup.cc> wrote:
> Sorry John, my brain was not in gear yet.
> I meant to ask what version of Perl is required for
> Excel::Writer::XLSX


Hi Bob,

The minimum perl version required for Excel::Writer::XLSX is 5.10.0.
This may increase to 5.10.1 after the next few revisions.

There is a perl 5.8.2 branch on GitHub for testing:

https://github.com/jmcnamara/excel-writer-xlsx/tree/perl5.8.2

It is a bit behind the CPAN release though.

Regards,

John.
--

Paul Findlay

unread,
Oct 18, 2011, 8:01:17 PM10/18/11
to spreadsheet...@googlegroups.com
Hi John,

Is there anything making you want to avoid having the default Excel::Writer::XLSX work with perl .5.8.5+?

Regards,

Paul

jmcnamara

unread,
Oct 19, 2011, 5:32:07 AM10/19/11
to Spreadsheet::WriteExcel
On Oct 19, 1:01 am, Paul Findlay <p...@findlay.net.nz> wrote:
> Is there anything making you want to avoid having the default
> Excel::Writer::XLSX work with perl .5.8.5+?


Hi Paul,

The following isn't directed at you. Your question just gives me a
chance to air some of my thoughts and rationale on this issue.


Spreadsheet::WriteExcel supports perl versions back to 5.005.
Maintaining compatibility and testing across newer perl version was a
pain. In particular 5.6 and 5.8.0 caused a lot of spurious Unicode
issues. So the minimum feasible perl version for Excel::Writer::XLSX
is probably 5.8.2.

My main reason for choosing perl 5.10 was that I wanted to be able to
use the "//" defined-or operator. Excel::Writer::XLSX is an API heavy
module and, although it may sound trivial, defined-or save me a lot of
time (and sanity).

Other reasons that I chose 5.10 are:

* I also wanted to use say(), smart match and given/when (although I
haven't used them to date).

* Excel 2007 and perl 5.10 came out in the same year. I wouldn't argue
this one very strongly because I'm practical but if an organisation is
willing to roll-out a large scale software upgrade such as Office 2007
why can't it roll out a (probably much smaller) upgrade for perl.

* Modern Perl. Although I was initially reticent about chromatic's
ideas in relation to Modern Perl. I have come around. I now see it as
our responsibility as software professionals working with Perl to drag
it up out of the mire of legacy Perl.

* I wanted to be able to use Test::More's done_testing() without
specifying a required version. This is why Excel::Writer::XLSX will
move to perl 5.10.1 in the next 1-2 releases.


However, as I said I'm practical. I realise that we don't always get
to choose or influence the versions of software that we have to work
with. I also want Excel::Writer::XLSX to be used by as many people as
possible and clearly there is a group of people who still need 5.8.x
support.

My solution was to maintain a perl 5.8.2 branch of Excel::Writer::XLSX
on Github:

https://github.com/jmcnamara/excel-writer-xlsx/tree/perl5.8.2

However, maintaining that branch has proved to be enough work to make
me reluctant to do it more than infrequently.

So ultimately it comes down to two choices for me: use 5.10.1 and the
nice time saving tools it offers but occasionally waste time
maintaining a back-port or use 5.8.2 and not have to worry (much)
about compatibility but not have access to the time saving tools.

Since time is something I don't have a lot of, I chose to use 5.10.

For 5.8.2 support I can see two possible solutions:

1. Someone could fork Excel::Writer::XLSX as
Excel::Writer::XLSX_perl582 and maintain and release a perl 5.8.2
version. (Before everyone jumps up to volunteer I warn you that this
would involve a reasonable amount of work and responsibility).

2. I could do the above and charge a nominal licence fee for "legacy"
support in the way that ActiveState do for older perl versions. These
fees would offset the pain of back-porting and also pay for the, yet
another, Excel licence that I keep having to buy.

John.
--

John Johnson

unread,
Oct 27, 2011, 7:09:42 PM10/27/11
to Spreadsheet::WriteExcel
John,

Glad I found this; I was about to send a lengthy e-mail directly to
your cpan.org e-mail explaining this very issue.

I work in a fairly inflexible corporate environment. We primarily use
RHEL4 and RHEL5, which are loaded with Perl v5.8.5 and v5.8.8
respectively. I'm betting that many of your corporate users find
themselves in a similar position... we often need to (quickly) make
use of what is on hand, with (unreasonable) constraints on what we can
do.

Anyway, I was able to hack together a version of the module that will
serve my needs. Here is a sample of what I did to work around the
version requirement:

<excerpt from Excel/Writer/XLSX/Package/Core.pm>
#use 5.010000;
use 5.008005;

#my $localtime = shift // $self->{_localtime};
my $localtime = shift; $localtime = $self->{_localtime} unless
defined($localtime);

Not quite as concise or clean as the syntax you are using that
requires v5.10+, but I believe it is functionally equivalent.

Anyway, if you would like me to tar/gz the entire updated module for
your review, I would be happy to send it along… just let me know.

- JJ

John McNamara

unread,
Oct 27, 2011, 8:15:43 PM10/27/11
to spreadsheet...@googlegroups.com
On 28 October 2011 00:09, John Johnson <blackb...@yahoo.com> wrote:

I work in a fairly inflexible corporate environment.  We primarily use
RHEL4 and RHEL5, which are loaded with Perl v5.8.5 and v5.8.8
respectively.  I'm betting that many of your corporate users find
themselves in a similar position... we often need to (quickly) make
use of what is on hand, with (unreasonable) constraints on what we can
do.

Anyway, I was able to hack together a version of the module that will
serve my needs.  Here is a sample of what I did to work around the
version requirement:


Hi John,

I'll take your thoughts on board. As you say, you aren't the only one in this position.

You may have missed it in the above thread but there is already a perl 5.8.2 port available:


Regards,

John.
-- 

John Johnson

unread,
Oct 28, 2011, 10:52:15 AM10/28/11
to Spreadsheet::WriteExcel
Unfortunately I did not find spot the github release for Perl v5.8.2+
until I had already wasted the time hacking the module into working
form. And with this note in the main branch Changes file:

0.27 October 2 2011

+ Excel::Writer::XLSX is now 100% functionally and API compatible
with Spreadsheet::WriteExcel.

... I think I'll stick with my hacked 0.32 version version since there
have been so many changes since the June 2011 release.

I just want to say I’ve been using your Spreadsheet::WriteExcel module
for quite a while, and I really appreciate the contribution you have
made… it has been a real time saver for me!

On Oct 27, 8:15 pm, John McNamara <jmcnam...@cpan.org> wrote:

jmcnamara

unread,
Oct 28, 2011, 1:36:38 PM10/28/11
to Spreadsheet::WriteExcel


On 28 October 2011 15:52, John Johnson <blackb...@yahoo.com> wrote:



... I think I'll stick with my hacked 0.32 version version since
there
have been so many changes since the June 2011 release.


Hi John,

No problem. It will probably be a few weeks before I can merge up the
5.8.2 branch to the head anyway.

Thanks for the kind comments. Have a good weekend,

John.
--

jmcnamara

unread,
Oct 30, 2011, 9:29:03 AM10/30/11
to Spreadsheet::WriteExcel
Hi,

I've updated the perl 5.8.2 branch to the latest CPAN release (0.33).
Download link:

https://github.com/jmcnamara/excel-writer-xlsx/zipball/perl5.8.2

John.
--

jmcnamara

unread,
Dec 4, 2011, 6:49:20 PM12/4/11
to Spreadsheet::WriteExcel
Hi,

As an update to this thread, Excel::Writer::XLSX has reduced the
minimum perl version requirement from perl 5.10.0 to perl 5.8.2.

It is no longer necessary to get a 5.8.2 version from Github. As of
version 0.39 of Excel::Writer::XLSX the CPAN versions also support
perl 5.8.2.

Regards,

John.
--

Reply all
Reply to author
Forward
0 new messages