Jasio
Jasio

Reputation: 275

Inconsistent CPAN module behaviour - whom to blame?

I noticed that Spreadsheet::XLSX module behaves inconsistently depending on the way it was installed. When installed on OpenSUSE by /usr/bin/cpan, it read the date from a cell in an Excel 2007 sheet as:

$VAR1 = bless({
    'Format' => 'yyyy-mm-dd', 
    'Val' => '2016-01-04', 
    '_Value' => '2016-01-04', 
    'Type' => 'Date' 
}, 'Spreadsheet::ParseExcel::Cell' )

which was correct. However on a computer where it was installed as RPM from the OpenSuSE repository, the same code reading the same cell of the same sheet returned:

$VAR1 = bless({ 
    'Type' => 'Date', 
    'Format' => 'm-d-yy', 
    'Val' => '42373', 
    '_Value' => '1-4-16' 
}, 'Spreadsheet::ParseExcel::Cell'  );

To me it looks as if the code compiled on my own machine included different defaults or at least reads the sheet in a different way than compiled by the distribution maintainer.

Does it look like a fault of the original author who wrote the code which depends on compile time environment, a distribution maintainer who compiled a non-portable code, or someone who decided to include compile time environment dependent code in the repository as RPM?

I do not want to blame anybody, just want to know, where I should submit the bug report.

Upvotes: 0

Views: 104

Answers (2)

Jasio
Jasio

Reputation: 275

[shame on] Looks like the only party to blame is myself [shame off].

I didn't notice nor even checked that the module distributed as RPM was outdated. Since the flaw was fixed in the meantime, the newest module installed from CPAN worked correctly.

Upvotes: 0

clt60
clt60

Reputation: 63932

About the "blame". ;) First, read the licence to the module. And also read the GPL for the Linux.

You will find something like: THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.

About the bug-reports: Of course, bug reports are welcomed.

About the problem:

  • Check the changelog to the module.
  • you will find:

0.14

  • change default date format to yyyy-mm-dd. This matches Spreadsheet::ParseExcel.

So, probably not a BUG - but an documented change.

Check the module versions for the both (aka installed from cpan and by RPM).

Upvotes: 8

Related Questions