Skip Menu |

This queue is for tickets about the Spreadsheet-XLSX CPAN distribution.

Report information
The Basics
Id: 78982
Status: resolved
Priority: 0/
Queue: Spreadsheet-XLSX

People
Owner: Nobody in particular
Requestors: EDAVIS [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 0.13-withoutworldwriteables
Fixed in: 0.15



Subject: Patch to fix when attributes in <Relationship> element appear in different order
XML allows attributes to appear in any order, but Spreadsheet::XLSX looks for <Relationship> targs containing the Id attribute followed by the Target attribute. If these attributes appear in a different order it breaks. Here is a patch to fix: --- /usr/share/perl5/vendor_perl/Spreadsheet/XLSX.pm 2012-06-07 11:21:05.601607159 +0100 +++ ./XLSX.pm 2012-08-15 16:20:37.122263889 +0100 @@ -88,9 +88,12 @@ foreach ($member_rels -> contents =~ /\<Relationship (.*?)\/?\>/g) { - /^Id="(.*?)".*?Target="(.*?)"/ or next; + /\bId="(.*?)"/ or next; + my $id = $1; + /\bTarget="(.*?)"/ or next; + my $target = $1; - $rels {$1} = $2; + $rels {$id} = $target; }
This is fixed in 0.15.