Skip Menu |

This queue is for tickets about the Excel-Template CPAN distribution.

Report information
The Basics
Id: 5969
Status: resolved
Priority: 0/
Queue: Excel-Template

People
Owner: Nobody in particular
Requestors: jamesb-cpan [...] comcast.net
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.11
Fixed in: (no value)



Subject: Doesn't handle empty arrays for loops
Empty arrays for loops cause an error. HTML::Template eats them just fine though. -------------------------------------------- This is perl, v5.8.2 built for i86pc-solaris -------------------------------------------- -------------------------------------------- error message: -------------------------------------------- Modification of non-creatable array value attempted, subscript -1 at [snip]/Excel/Template/Iterator.pm line 62. -------------------------------------------- test perl script: -------------------------------------------- use strict; use Excel::Template; my $tmpl = new Excel::Template(filename => "excel_template_test.xml"); $tmpl->param(list => [ ]); $tmpl->write_file("test.xls"); -------------------------------------------- excel_template_test.xml: -------------------------------------------- <workbook> <worksheet name="Test"> <row> <cell text="List:"/> <loop name="list"> <cell><var name="value"/></cell> </loop> </row> </worksheet> </workbook>
This has been resolved in Excel::Template 0.12, Graph::Template 0.05, and PDF::Template 0.18. Thank you for the bug report.