Skip Menu |
 

This queue is for tickets about the SWF-Chart CPAN distribution.

Report information
The Basics
Id: 18767
Status: new
Priority: 0/
Queue: SWF-Chart

People
Owner: Nobody in particular
Requestors: german [...] satec.es
Cc:
AdminCc:

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



Subject: Error passing an array with a zero value in position 1 to add_dataset
MIME-Version: 1.0
X-Mailer: MIME-tools 5.418 (Entity 5.418)
Content-Type: text/plain; charset="utf8"
Content-Disposition: inline
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 618
Download (untitled) / with headers
text/plain 618b
When the function add_dataset receives an array with a zero value in the second position, for example @data = (1,0,2,3,4,5), the function exist with error: "Can't use string ("0") as an ARRAY ref while "strict refs" in use at /usr/local/lib/perl5/site_perl/5.6.1/SWF/Chart.pm line 257" This seems to be produced that having a zero in position 1 makes the condition check in the function to be ignored an thus not converting the array into the format expected by the object. There is a workaround that consist in passing the array as a reference, i.e. $graph->add_dataset(\@data) instead of $graph->add_dataset(@data).


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.