Skip Menu |

This queue is for tickets about the Graphics-ColorPicker CPAN distribution.

Report information
The Basics
Id: 59193
Status: resolved
Priority: 0/
Queue: Graphics-ColorPicker

People
Owner: Nobody in particular
Requestors: spoon.reloaded [...] gmail.com
Cc:
AdminCc:

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



Subject: eval() should be changed to parseInt()
rgb[0] = eval('0x' + s.charAt(0) + s.charAt(1)); // r rgb[1] = eval('0x' + s.charAt(2) + s.charAt(3)); // g rgb[2] = eval('0x' + s.charAt(4) + s.charAt(5)); // b should be changed to rgb[0] = parseInt(s.slice(0,2), 16); // r rgb[1] = parseInt(s.slice(2,4), 16); // g rgb[2] = parseInt(s.slice(4,6), 16); // b
parseInt is not a function in any version of perl that I have through 12.1 Even if it exists in a newer version it is not backwards compatible what exists in the field.
From: spoon.reloaded [...] gmail.com
On Thu Jul 08 16:39:23 2010, MIKER wrote: Show quoted text
> parseInt is not a function in any version of perl that I have through 12.1 > > Even if it exists in a newer version it is not backwards compatible what > exists in the field.
The code in question is Javascript (which is printed from perl), not perl
Patch applied Graphics-ColorPicker-0.12.tar.gz uploaded to CPAN Thanks to spoon.reloaded@gmail.com for the code improvement On Fri Jul 09 12:05:35 2010, https://launchpad.net/~newacct wrote: Show quoted text
> On Thu Jul 08 16:39:23 2010, MIKER wrote:
> > parseInt is not a function in any version of perl that I have
through 12.1 Show quoted text
> > > > Even if it exists in a newer version it is not backwards compatible what > > exists in the field.
> > The code in question is Javascript (which is printed from perl), not perl